robstark

New Member
Joined
Feb 18, 2013
Messages
14
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:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Which version of Excel are you using?

XL2007+ Try
=COUNTIFS(A2:A15,"Dog",B2:B15,"<>")
 
Upvote 0
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,"<>")
 
Upvote 0

Forum statistics

Threads
1,214,647
Messages
6,120,722
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top