using a countif with multiple columns

  • Thread starter Thread starter mike.wilson8
  • Start date Start date
M

mike.wilson8

I'm trying to count records if in col c(c2:c160) the value is =2 and in
col j(j2:j160) the value is between 1-7.

If the criteria matches count that as one record.

Any help would be much appreciated
 
Try this array* formula:

=SUM(IF((C$2:C$160=2)*(J$2:J$160>=1)*(J$2:J$160<=7),1,0))

* As this is an array formula, once you have typed it in (or
subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
ENTER. If you do this correctly then Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete
 
Hi

=SUMPRODUCT(--(C2:C160=2),--(J2:J160>=1),--(J2:J160<=7))

Arvi Laanemets
 
Why do you have to use CTRL-SHIFT-ENTER instead of just ENTER? What
difference does that make?
 
Why do you have to use CTRL-SHIFT-ENTER instead of just ENTER? What
difference does that make?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top