Need help converting a Sum/Offset/Match formula to calculate from a column rather than a row.
Sample file explains it best.
Thank you...
Need help converting a Sum/Offset/Match formula to calculate from a column rather than a row.
Sample file explains it best.
Thank you...
Something like this? In R5, enter
=SUM(INDIRECT("V4:V" &MATCH(Report_Month,$S$4:$S$15,0)+3))
Most excellent! Thank you
Now - how does it work?
This works but does not allow me to move the data without re-writing the formula. Anyone have another solution?
Thansk - Steve
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.
Very nice! Thank you. And the explanation is very helpful - thanks again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks