counting multiple cells with multiple criteria

cgisler

New Member
Joined
Mar 2, 2011
Messages
2
I need the total number of cells that meet a specific criteria. I can break down what I need into 3 parts and using COUNTIF, get the results for each part. HOwever, I need the 3 parts to become one formula.

=COUNTIF(January!B:B, "OS")
=COUNTIF(January!A:A,">=1")
=COUNTIF(January!A:A, "<=7")

What I'm trying to do is create one formula that totals the number of cells that meet these specific criteria. It needs to 1) the cells in A:A need to be between a specific number range (technically I need it between a date range like 1/1/2011 and 1/7/2011) so that anything that falls on or between that range is counted. AND 2)the cells in B:B also match a specific criteria, "OS"

Is this even possible? and can someone help me create this formula?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Welcome to the forums!

You can do this in the following manner:

Excel 2003 or older:

=SUMPRODUCT(--(January!B1:B100="OS"),--(January!A1:A100>=Date(2011,1,1)),--(January!A1:A100<=Date(2011,1,7)))

Excel 2007 or newer:

=COUNTIFS(January!B:B,"OS",January!A:A,">="&Date(2011,1,1),January!A:A,"<="&Date(2011,1,7))

If you want to test it for the dates, then
 
Upvote 0
=SUMPRODUCT(--(January!B1:B100="OS"),--(January!A1:A100,>=1),--(January!A1:A100 <=7))
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,795
Members
452,943
Latest member
Newbie4296

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