+ Reply to Thread
Results 1 to 7 of 7

Need help with OFFSET statement

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    Monterey, CA
    Posts
    8

    Need help with OFFSET statement

    Is there a way to make the last two parts ("height" and "width") of the OFFSET statement formula static (meaning they alway refer to the same cell)? I am inputting a different number in the "colum" section of the formula and every time I do...it changes which cells the "height" and "width" refer to.
    Please help!
    Matt
    Last edited by Steelhead; 10-21-2008 at 04:02 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    To always refer to the same cells make the cell reference absolute by adding $ signs before both the column and row references...

    e.g. $C$5
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-02-2008
    Location
    Monterey, CA
    Posts
    8
    Thanks NBVC but...
    I tried that but it doesn't work using a '$" in the last part ("height" and "width") of a OFFSET statement. The "$" does work in the "column" portion of the formula.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Are you trying to enter a reference to a cell that contains numbers (for height,width) or are you hard coding the numbers?

    Can you show your formula and what is going wrong?

  5. #5
    Registered User
    Join Date
    10-02-2008
    Location
    Monterey, CA
    Posts
    8
    Yes...I'm trying to enter a reference to a cell that contains numbers (for height,width)
    I've attached an example of what I'm trying to do. If there is an easier way instead of using the OFFSET" function...I'm all for it. The formula is in cell P7. I'm trying to add up a set of number after the user inputs a starting month/number. So...if the user inputs a 4 (in cell B2)...the formula will add all values from April to December. If the user inputs a 6 (in cell B2)...the formula will add all values from June to December....and so on. See attached test worksheet.
    Thanks (in advanced) for your help everyone!!!
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can use: =SUM(OFFSET(C7,0,B2-1):N7)

    or better yet: =SUM(INDEX(C7:N7,B2):N7)

  7. #7
    Registered User
    Join Date
    10-02-2008
    Location
    Monterey, CA
    Posts
    8

    Many thanks NBVC....you are the man!

    Many thanks NBVC....you are the man!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1