Page 1 of 1

[Solved] Summing a segment of row data

PostPosted: Tue May 14, 2019 1:19 pm
by Vexed
I have excerpted 2 rows of data: dates with their corresponding values. I want to sum the 5 values immediately following any one of the dates I select (the variable). In other words I want to sum the values for Mar 11 thru 15 when Mar 8 is the variable specified. The variable is generated elsewhere in the spreadsheet so it would be specified by a cell reference in the formula. I have experimented with “Offset” and “Sum Offset” but I am unable to plug the variable’s cell reference into a formula that does not result in an error code. What should a viable formula look like? Thanks.

Code: Select all   Expand viewCollapse view
Mar 01 Mar 04 Mar 05 Mar 06 Mar 07 Mar 08 Mar 11 Mar 12 Mar 13 Mar 14 Mar 15 Mar 18
                                 
110    -207   -13    -133   -200   -23    201    -96    148    7      139    65

Re: Summing a segment of row data

PostPosted: Tue May 14, 2019 3:02 pm
by FJCC
I used this formula in the attached document.
Code: Select all   Expand viewCollapse view
SUM(OFFSET(B6;0;MATCH(B1;B5:M5;0);1;5))

Re: Summing a segment of row data

PostPosted: Tue May 14, 2019 3:38 pm
by Vexed
Yep, that works. Thanks.