Help with IF - THEN

  • Thread starter Thread starter Cindyt
  • Start date Start date
C

Cindyt

Hi - need formula that will count in one column based on condition in another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct
 
When you have multiple criteria use SUMPRODUCT()

=SUMPRODUCT((A1:A10=criteria1)*(B1:B10=criteria2))
=SUMPRODUCT((A1:A10=F1)*(B1:B10=F2))

If this post helps click Yes
 
Ahh, the ever popular SUMPRODUCT!

=SUMPRODUCT((A2:A5000="Blue")*(B2:B5000="Y"))

Please note, cannot use entire column (A:A), and both ranges must match
(2-5000, or 2 - 100, or whatever)
 
If you're using Excel 2007:

=COUNTIFS(A1:A100,"Blue",B1:B100,"Y")

Better to use cells to hold the criteria:

D1 = Blue
E1 = Y

=COUNTIFS(A1:A100,D1,B1:B100,E1)
 

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

Similar Threads

Help needed 0
counting blank cells within two columns 2
Formula question 3
Formula Help 2
Countif - HELP ME!!! 2
COUNT IF - Conditional Formatting 2
Sorting and Formulas 1
IF THEN statements 6

Back
Top