+ Reply to Thread
Results 1 to 6 of 6

SUM OFFSET MATCH a column not row

  1. #1
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    SUM OFFSET MATCH a column not row

    Need help converting a Sum/Offset/Match formula to calculate from a column rather than a row.

    Sample file explains it best.

    Thank you...
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: SUM OFFSET MATCH a column not row

    Something like this? In R5, enter

    =SUM(INDIRECT("V4:V" &MATCH(Report_Month,$S$4:$S$15,0)+3))

  3. #3
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: SUM OFFSET MATCH a column not row

    Most excellent! Thank you

    Now - how does it work?

  4. #4
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: SUM OFFSET MATCH a column not row

    This works but does not allow me to move the data without re-writing the formula. Anyone have another solution?

    Thansk - Steve

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUM OFFSET MATCH a column not row

    If we take some time to review and understand what the formula is doing, then we can adjust it to do columns instead of rows..

    =SUM(OFFSET(B15,0,0,1,MATCH($B$1,$B$12:$M$12,0)))
    We'll ignore the SUM for now..that's simple enough
    =OFFSET(B15,0,0,1,MATCH($B$1,$B$12:$M$12,0))

    offset creates a range that is based on the first argument B15.
    the next argument (0) is "how many rows away from B15 do we want to go"
    the next argument (also a 0) is "how many columns away from B15 do we want to go"
    The next 2 arguments (1 and the match function) determine what SIZE that resulting range should be
    1 =how many rows
    and the Match =how many columns
    this makes a 1 Row Range, and how many columns is determined by the Match.

    So, we should be able to just swap the last 2 arguments to make it a
    1 Column Range, and the number of Rows would be determined by the Match
    =OFFSET(B15,0,0,MATCH($B$1,$B$12:$M$12,0),1)
    But we need to adjust the match to the appropriate ranges
    =OFFSET(B15,0,0,MATCH($B$1,$S$4:$S$15,0),1)
    And adjust the originating cell from B15 to V4
    =OFFSET(V4,0,0,MATCH($B$1,$S$4:$S$15,0),1)

    Then of course put the SUM back in.
    =SUM(OFFSET(V4,0,0,MATCH($B$1,$S$4:$S$15,0),1))


    Hope that helps.

  6. #6
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: SUM OFFSET MATCH a column not row

    Very nice! Thank you. And the explanation is very helpful - thanks again.

+ 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