Help with COUNTIFS formula

RetroMe

New Member
Joined
Oct 2, 2009
Messages
48
Hi All,

I have the following formula:

=COUNTIFS(DATA!$H$2:$H$20000,">="&$D$3,DATA!$H$2:$H$20000,"<="&$E$3,DATA!$C$2:$C$20000,'NB Info'!$B7,DATA!$N$2:$N$20000,"New Business",DATA!$P2:$P20000,"N")-(K7)

But I know need the 'New Business' section to also take into account 'Transfer Business' or 'Rollover Business'.

So it looks like this:

Count If - H2:H20000 is >= D3
H2:H20000 is <= E3
C2:C20000 is = B7
N2:N20000 is = 'New Biz' or 'Transfer Biz' or Rollover Biz'

Hope that makes sense.

Thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Sorry to bump so soon, but I need to figure this out in the next hour! Would really appreciate someones assistance.
 
Upvote 0
If you want those 3 exclusively try

=SUM(COUNTIFS(DATA!$H$2:$H$20000,">="&$D$3,DATA!$H$2:$H$20000,"<="&$E$3,DATA!$C$2:$C$20000,'NB Info'!$B7,DATA!$N$2:$N$20000,{"New Business","Transfer Business","Rollover Business"},DATA!$P2:$P20000,"N"))-K7

Or if those are the only possible entries that end with "Business" then you could use a wildcard, e.g.

=COUNTIFS(DATA!$H$2:$H$20000,">="&$D$3,DATA!$H$2:$H$20000,"<="&$E$3,DATA!$C$2:$C$20000,'NB Info'!$B7,DATA!$N$2:$N$20000,"*Business",DATA!$P2:$P20000,"N")-K7
 
Upvote 0
Barry, works perfectly thank you.

One more question, how would it work it I want to do a sum rather than a count?
 
Upvote 0
For a sum change COUNTIFS to SUMIFS and include the sum range right at the start, e.g. for that first formula

=SUM(SUMIFS(DATA!$A$2:$H$A20000,DATA!$H$2:$H$20000,">="&$D$3,DATA!$H$2:$H$20000,"<="&$E$3,DATA!$C$2:$C$20000,'NB Info'!$B7,DATA!$N$2:$N$20000,{"New Business","Transfer Business","Rollover Business"},DATA!$P2:$P20000,"N"))-K7

That will sum column A where all the other criteria are satisfied
 
Upvote 0

Forum statistics

Threads
1,224,614
Messages
6,179,906
Members
452,949
Latest member
beartooth91

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
Back
Top