Function for an specific function

Copper Contributor

Hi,

 

I want to search in cells for a month which should correspond to the month i put in as search criterium. Then I want Excel to give the value that is connect to this month multiplied by a corresponding percentage. And the third step is that Excel should sum up all the values that correspond to the given month.

 

I used XLookup(), this function did exactly what i wanted for one value but does not sum several values that meet the criteria. 

 

An example for what i want:

600    10%  January

700    30%  February

1100  100% January

 

if I look for the values that correspond to January, I want my function to give: 10%*600+100%*1100 = 1160. Is this possible?

 

Best regards,

Tiemen

3 Replies

@Tiemen1180 Any particular reason for using XLOOKUP?

 

SUMPRODUCT will do it like this.

 

Screenshot 2020-04-22 at 11.28.16.png

@Riny_van_Eekelen It works, thank you so much!

 

There was no particular reason for using xlookup, I just read something about it on the internet and thought it might work. But this is much better, thanks!

@Tiemen1180 Graag gedaan!