Countifs Function based on 4 criteria

Competition

New Member
Joined
Sep 19, 2011
Messages
34
Hi
I'm trying to use a countifs function based on 4 criteria and it's turning up a value of 0. I want to count how many cars house1 sells between Aug 1 and Aug 7? car is the variable name for cars and house1 = house1. Table1Range is the table that I'm working with..

Here is my formula

=COUNTIFS(Table1Range,House1,Table1Range,car2,Table1Range,">="Aug1,
Table1Range,"<="Aug7'New)
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Sorry for that last post - it was by accident


Follow up to this question on countifs based on 4 criteria, I'm using another count if function and I basically want to apply an additional criteria to the countif that has already 4 in it. The cells below have the respective criteria. What I want to do is whenever these values come up I want to deduct them from the total.

S2 = cat
S3 = dog
S4 = bat
S5 = hat

These values are inclusive meaning that it can be 1, 2, 3, or all 4. Since there may be ones that have all 4. Is there a way of doing this without splitting up the formula? Below I have the formula I'm working with, the new addition is in bold. What I have done is basically, copied the same formula as before, but added another criteria to deduct the values however that criteria doesn't seem to be working.

=COUNTIFS('Aug'!$H$2:$H$500000,$A6,'Aug'!$K$2:$K$500000,$D$2,'Aug'!$I$2:$I$500000,">="&$B$1,'Aug'!$I$2:$I$500000,"<="&$B$2)-IFERROR(COUNTIFS('Aug'!$H$2:$H$500000,$A6,'Aug'$K$2:$K$500000,$D$2,'Aug'!$I$2:$I$500000,">="&$B$1,'Aug'!$I$2:$I$500000,"<="&$B$2,'Aug'!N1:N500000,AND(OR("="&S2,"="&S3,"="&S4,"="&S5))),0)

Any help would be much appreciated
 
Upvote 0

Forum statistics

Threads
1,224,621
Messages
6,179,929
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