Forum Discussion
Etienne_D
Jan 18, 2022Copper Contributor
Search between two text cells
I'm trying to do the sum of all prices where the date in un January for each name ID that I have in an other tab. Basically, on my first tab, I have all names ID (Bob, James, Lucas) ...
OliverScheurich
Jan 18, 2022Gold Contributor
=SUMPRODUCT(((MONTH(INDIRECT("Feuil"&ROW(2:2)&"!C"&B1+1&":C"&B2-"1")))=B3)*INDIRECT("Feuil"&ROW(2:2)&"!D"&B1+1&":D"&B2-"1"))
This formula works in my spreadsheet as shown in the attached file. The name can be selected in A1 and in cell A7 the sum for e.g. january is calculated. The month can be dynamically chosen in cell B3.