Add a product cost under a specific month column (sumproduct?)

Looking to be able to change the desired month and product value, indicated in yellow and obtain the total cost (value) for the specified product and month.
Thanks,
Who is Participating?

x

Commented:
Hello JP,

Here are two possible ways

=SUMPRODUCT((B3:D3=B9)*(A4:A7=B10),B4:D7)

or

=SUMIF(A4:A7,B10,INDEX(B4:D7,0,MATCH(B9,B3:D3,0)))

Although the latter is longer it's arguably more efficient. Formula 1 needs to be used if there could be more than 1 column with a date header matching B9

regards, barry
0

Commented:
See examples in your sheet, I put one formula in F12 and one in G12 - of course they return the same result......

regards, barry
26832739.xls
0

Author Commented:
Excellent application!  I favor the sumproduct approach, as it is easier for me to follow.
Thanks!
JP
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.