Count text if another range has met criteria

R

RickBurda

My data sheet has 2 columns to use with this formula, even tho it has
several columns in the spreadsheet. On column "B" contains one of 2
text entries, either "TA", "HC", or its blank. In the column "E", it
will have an "X" or blank. What I want to do is count the number of
"X"s in column E IF in the same row of column B has "TA" in it. AN
example would be like this: B:1 thru B:5 have TA in it. E2: thru E10
have an X in them. The result should be 4, as there is no X in E1, and
there are no TA's in B6:B10. Any sugestions? Thanks,
 
D

Dave R.

You can do this with an array function using SUM, or SUMPRODUCT, multiplying
the ranges and criteria together like
sumproduct((a1:a500,"x")*(b1:b500,"y"))

this topic has been done to death :|
 
A

Alan Cocks

Rick
in cell F1 put the formula

=IF(B1="TA",IF(E1="X",1,""),"")

Copy or drag this down to the row at the bottom of your list.

Then use the formula

=COUNT(F1:F20)

to count the "1"s in column F

Alan Cocks
 

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