Please help: Trying to count using criteria from two columns.

M

Mike

I am trying to use the countif function in one column, but I only want to
count cells if the corresponding row in another column contains a
certain value.

IE
Column A Column B
1 Open 1 X
2 Closed 2 X
3 Open 3 X

I only want to count the X's that are associated with Open in column
1. Is there a way to do this without typing in each cell?

I have also tried using this:
=SUM(IF((G4:G52="Open")*(L4:L52="X"),1,0)), but I get a #VALUE error.

Any help would be very much appreciated.
 
J

Jason Morin

It will return an error unless you array-enter the
formula, meaning you must press ctrl/shift/enter, not
just enter. XL will place {} around the formula.

FWIW, you can shorten you formula to:

=SUM((G4:G52="Open")*(L4:L52="X"))

HTH
Jason
Atlanta, GA
 

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

Top