0
votes

I need the help of the experts here:

I have an excel spreadsheet that looks like the photo below.

excel screenshot

Which function can I use to sum the total monthly units sold for each product in columns i4-p12? For example, cell d2 should include all the leg pillows that were sold on January 18. Cell d19 should include all the wedge pillows that were sold on April 18, etc.?

I tried to use the sumif formula, but it doesn’t sum all values, only the first one. I am looking for one function that I can drag to all cells.

Any help will be much appreciated.

Thanks

1

1 Answers

0
votes

Assuming column C just has the month as text and D1:F1 have the year just as numbers.

=SUMPRODUCT(($I$5:$I$12="Wedge Pillow")*($J$4:$P$4=DATEVALUE("1-" & $C2 & "-" & D$1)),$J$5:$P$12)