Vrienden van Andries
Vrienden van Andries

Reputation: 121

Sum multiple rows using columns as criteria

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))

Upvotes: 1

Views: 429

Answers (1)

Rory
Rory

Reputation: 34085

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.

Upvotes: 1

Related Questions