Excel Formula Help INDEX MATCH Dates

782 Views Asked by At

I have been working on this formula for the last 40 minutes and I can't really figure out where I'm doing wrong. I would really appreciate the community's help.

I have provided a screen shot below.

For some reason the formula is only taking the first instance of the currency provided in "column O:O" and it is not adding up the multiple instances of the matching months and year. I tried putting SUM in the formula but I got an error.

I INDEX MATCH the MONTH and YEAR but it is not adding all the instances of the matching MONTH and YEAR

1

There are 1 best solutions below

0
On BEST ANSWER

INDEX/MATCH And VLOOKUP will only return the first instance.

You will need to use SUMPRODUCT() to return what you want:

=SUMPRODUCT((MONTH(D17)=MONTH($M$2:$M$6))*(YEAR(D17)=YEAR($M$2:$M$6)),$O$2:$O$6)

Note: SUMPRODUCT is an Array Type formula an thus the cell references should include only those that have data and avoid full column data.

enter image description here