SUMIFS or SUMPRODUCT with 2D data table and vector criteria

boozers

New Member
Joined
Jan 23, 2019
Messages
2
Long-time lurker, first time poster. I've read FAQs, and searched, but suspect I'm using the wrong search terms.

I've got a table with two dimensional data. Dates, monthly, along the top by column. Projects, including start date, along the left, by row. I'm trying to SUMIFS the data, such that I only want positive values and prior to a date in a reference cell. A link to OneDrive example sheet is below but I'll also try showing an example here:

4/30/195/31/196/30/197/31/19
4/30/19(425)666
5/31/19(1244)1111
6/30/19(2182)34
7/31/19(56)

<tbody>
</tbody>

The (56) in the 7/31/19:7/31/19 cell is the sum of all positive figures above and prior to 7/31/19

The formulas I've tried for this look like this: SUMIFS($b$2:$z4,$b$2:$z4,">0",$b$2:$z$2,"<"&$a5) or SUMPRODUCT(--($b$2:$z$2<$B15),--($b$2:$z4>0),$b$2:$z4)

I'm indifferent between a SUMIFS solution or SUMPRODUCT solution, but the only way I've been able to avoid a #VALUE error is by removing the date condition and manually adjusting the columns I'm summing.

Thanks in advance and apologies if I broke protocol or did a poor job of explaining.

https://1drv.ms/x/s!Ajx8pq4MoHlScLyCjceXZYB3VlQ
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi & welcome to MrExcel.
Is this what you want
=SUMPRODUCT(($E$5:$EG$5<$B15)*($E$6:$EG14>0),$E$6:$EG14)
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,841
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top