Multiple Functions

robstark

New Member
Joined
Feb 18, 2013
Messages
12
I have 2 columns and I need the formula to read column "A" first and if it meets a certain criteria to look at column "B" and count if there's any text in the cells. See the example to show what I'm looking for. I would want the formula to look at column a for pet type (e.g. dog) and then look at owner's name (any text in that column gets counted) and give me the sum (in this case 3). I've tried a couple of things and I'm running out of time.

Example:
Pet TypeOwner's Name
dog
dogJohn
dog
dogJane
dogDan
catMollie
catMary
cat
catScott
birdGeorge
bird
fishBill
fish
fishBetty

<colgroup><col><col></colgroup><tbody>
</tbody>

Thanks as always!
 
Last edited by a moderator:

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Which version of Excel are you using?

XL2007+ Try
=COUNTIFS(A2:A15,"Dog",B2:B15,"<>")
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,441
Try this:
This formula assumes your data is in cells A1:A20 and B1:B20
Put this formula in cell D1.
Put the word "Dog" in cell C1
You can modify the formula if you like.
Optional:
You can take the formula in cell D1 and fill it down.
Then put "Cat" in cell C2 and so on if you like.
Code:
=COUNTIFS($A$1:$A$20,C1,$B$1:$B$20,"<>")
 

robstark

New Member
Joined
Feb 18, 2013
Messages
12
jonmo- I tried this one but I got a value error- I must be missing something.
 

Forum statistics

Threads
1,085,712
Messages
5,385,384
Members
401,943
Latest member
xvpnkr

Some videos you may like

This Week's Hot Topics

Top