Add 1 if two criteria are met across multiple tabs

johnb1979

New Member
Joined
Dec 9, 2019
Messages
37
Office Version
  1. 365
Platform
  1. Windows
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'.

1595862563043.png


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.

1595862788466.png



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
Joined
Dec 9, 2019
Messages
37
Office Version
  1. 365
Platform
  1. Windows
How about
=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!!
 

Some videos you may like

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
Joined
Dec 9, 2019
Messages
37
Office Version
  1. 365
Platform
  1. Windows
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!!


1595923292316.png

1595923369385.png
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,682
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Dec 9, 2019
Messages
37
Office Version
  1. 365
Platform
  1. Windows
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
Joined
Jun 12, 2014
Messages
55,682
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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
Joined
Dec 9, 2019
Messages
37
Office Version
  1. 365
Platform
  1. Windows
OK, thank you. I'll keep messing with it.

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

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,682
Office Version
  1. 365
Platform
  1. Windows
You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
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?

Disable AdBlock

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
Top