# Thread: Index/match with multiple match criteria

Originally Posted by USAOz
I wish to sum the total wages for a selected employee in a particular quarter.
Attached has some formulae on the Wages & Salaries sheet in range D31:G35.
Select your employee ID in cell A32.
Have I guessed right?

2. Originally Posted by Bob Phillips
Here is a formula to give you weekly income for Q1, the rest should be easily figured out

=SUMPRODUCT(--(ROUNDUP(MONTH(\$C\$8:\$C\$30)/3,0)=E\$30),--(\$C\$8:\$C\$30<>""),\$L\$8:\$L\$30)
To which thread is this related? Your cell references do not match anything in my last file upload.
Also, are the double minuses in your formula correct? I can't work out the logic.
Neverheless, thanks for taking the time to attempt a solution. It is greatly appreciated.

3. The double minus (--) forces what follows to be a numerical value instead of text, so yes, it is correct.

4. Originally Posted by USAOz
To which thread is this related? Your cell references do not match anything in my last file upload.
Also, are the double minuses in your formula correct? I can't work out the logic.
Neverheless, thanks for taking the time to attempt a solution. It is greatly appreciated.
When I said Q1, I meant Quarter 1, cell E31, not cell Q1.

It most definitely does match your last upload, C8:C30 is the date which I parse, L8:L309 is the weekly income.

The double unary is to coerce an array of TRUE/FALSE into an array of 1/0 so that the product part of SUMPRODUCT has numbers to work on (a non-matched condition, FALSE, evaluates to 0 and so the product adds in 0).

Page 2 of 2 First 1 2

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•