Advanced count function

G

Guest

Lets say my data looks like this:
A B
5 Travis
4 Travis
3 Nick
2 Travis
1 Don
9 Mike

How do I make a count function that looks at that and the logic is:
If A is less than 4 and B equals Travis

And just to clearify that I understand if I get an answer, how would I do:
If A is greater than 2 and A less than 15 and B equals Travis

To verify, I want the number returned of how many results there are.
Thank you for looking, and for your help/time.
 
H

Harlan Grove

Eric said:
Lets say my data looks like this:
A B
5 Travis
4 Travis
3 Nick
2 Travis
1 Don
9 Mike

How do I make a count function that looks at that and the logic
is: If A is less than 4 and B equals Travis
=SUMPRODUCT((A2:A7<4)*(B2:B7="Travis"))

And just to clearify that I understand if I get an answer, how
would I do: If A is greater than 2 and A less than 15 and B
equals Travis
....

=SUMPRODUCT((A2:A7>2)*(A2:A7<15)*(B2:B7="Travis"))
 
P

PCLIVE

First one:
=SUMPRODUCT(--(A2:A10<4),--(B2:B10="Travis"))

Second one:
=SUMPRODUCT(--(A2:A10>2),--(A2:A10<15),--(B2:B10="Travis"))

HTH,
Paul
 

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

Conditional Formatting 2
Validation List 7
Count IF 1
Counting if Date1 is after and Date2 is before another date 5
If condition with text 3
COUNTIF 1
Greater than Less than formula 2
Frequency vs Count 10

Top