countif multiple criteria

kylefoley76

Well-known Member
Joined
Mar 1, 2010
Messages
1,553
I want to use a countif formula with multiple criteria. What I want to do is count how many times the cells are <>"" so long as b85 = time!$c$2:$c$5000

This is what I'm thinking but I don't know how to use multiple criteria

=COUNTIF(time!$G$2:$G$5000,time!$H$2:$H$5000<>""&b85=time!$c$2:$c$5000)
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Maybe:

=SUMPRODUCT(--(time!$H$2:$H$5000<>""),--(time!$C$2:$C$5000=B85))

I'm not sure what you want to do with column G.
 
Upvote 0

UniMord

Active Member
Joined
May 6, 2002
Messages
311
If you're using Excel 2007 or later, you should use COUNTIFS, which is purpose-built to do exactly what you're trying to do.

Also, it seems to me from your formula, that you might want to use an absolute reference: time!$B$85.
 
Upvote 0

kylefoley76

Well-known Member
Joined
Mar 1, 2010
Messages
1,553
Code:
=COUNTIFS(time!$C$2:$C$5000,B80,time!$J$2:$J$5000,time!$J$2:$J$5000<>"")

Ok, I tried the countifs but it isn't working.

I have two criteria, one b80 must equal the c column in time!

then my second criteria column j <>""

if both those are true then i want to count how many times column j is <>""

So far I'm not getting an error message but i'm also getting zero and i shouldn't
 
Upvote 0

Forum statistics

Threads
1,191,516
Messages
5,987,010
Members
440,074
Latest member
Emmanuelian

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