# Add 1 if two criteria are met across multiple tabs

#### johnb1979

##### New Member
Hi,

Thanks for your help on this one.

I'd like a formula that will add '1' when two criteria are met. Please see below example;

This is a sales tracking form. There are 3 jobs below that were quoted (and therefore 'active') in January and the column next to it, the month in which the quote was 'won'.

What I would like to happen is that in the 'summary' tab I have, if a job is ever marked as 'won', the total number of jobs appears in the relevant cell adjacent the relevant month (please see below). In this example, there should be a 1 in January and a 2 in February.

I hope this all makes sense and I appreciate any support you might be able to offer.

I look forward to hearing from you soon!

#### johnb1979

##### New Member
=SUMPRODUCT(COUNTIFS(INDIRECT("'"&Tab_Name&"'!I:I"),"Won",INDIRECT("'"&Tab_Name&"'!J:J"),"January"))

This worked perfectly! Thanks @Fluff

Thank you all for your support on this one - really is appreciated! One day I'll hope to be half as good as you excel wizards!!

### Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

#### johnb1979

##### New Member
I've just realised something and it's a massive school boy error and my apologies to @CA_Punit as you highlighted this earlier. I'm sure it'll be just a tweak to @Fluff 's formula but I need the 'unit' (or add 1) to appear in the relevant box if the any of the 'won' values are greater than £0. In the example below, The units won table should display 1 in the OV cell for January, and 2 in the AMR cell for February.

Again, my apologies for my error - it appears you understand my form better than I do!!

#### Fluff

##### MrExcel MVP, Moderator
How about, for OV
=SUMPRODUCT(COUNTIFS(INDIRECT("'"&Tab_Name&"'!I:I"),"Won",INDIRECT("'"&Tab_Name&"'!J:J"),"January"),INDIRECT("'"&Tab_Name&"'!E:E"),">0")
Just change the E:E to F:F etc for the other groups

#### johnb1979

##### New Member
Thanks @Fluff

I've just tried it and it returned a #VALUE! error. Would you know what I might be doing wrong please?

Thanks again

#### Fluff

##### MrExcel MVP, Moderator

Without anything to test on, not sure.
Although it may be that you are using whole columns & so it's picking up text.

#### johnb1979

##### New Member
OK, thank you. I'll keep messing with it.

Thanks for all your help - it's been great!

You're welcome.

Replies
2
Views
80
Replies
1
Views
231
Replies
1
Views
142
Replies
23
Views
351
Replies
4
Views
617

1,127,898
Messages
5,627,526
Members
416,250
Latest member
darius_rebelo

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back