Home > database >  Sum multiple rows using columns as criteria
Sum multiple rows using columns as criteria

Time:09-29

I'm trying to sum multiple rows using column headers as criteria but keep coming up blank. In this table, the range that needs to be summed is D2:F4 but ultimately I'll be summing arbitrary, contiguous date ranges.

All help greatly appreciated. Thanks! (Sorry no rep yet to post pics)

To return data from the current week (based on Rory's solution):

=SUMPRODUCT((B1:1>=(TODAY()-WEEKDAY(TODAY(),2) 1))*(B1:1<=(TODAY()-WEEKDAY(TODAY(),2) 5))*(B2:4))

CodePudding user response:

You can use SUMPRODUCT for this - eg:

=SUMPRODUCT((B1:Z1>=DATE(2021,9,1))*(B1:Z1<=DATE(2021,9,30))*(B2:Z4))

to sum data for September of this year.

  • Related