countif multiple criteria

kylefoley76

Well-known Member
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
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.

UniMord

Active Member
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.

UniMord

Active Member
Something like this: =COUNTIFS(time!\$G\$2:\$G\$5000,"<>",time!C\$2:\$C\$5000,\$B\$85)

kylefoley76

Well-known Member
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

kylefoley76

Well-known Member
hold on, i didn't see unimord's suggestion, i think i got it

kylefoley76

Well-known Member
yea, i got it, thanks

Replies
0
Views
232
Replies
3
Views
208
Replies
7
Views
372
Replies
1
Views
287
Replies
9
Views
263

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.

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

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