Lookup values in 2 columns, count and then multiply??? HELP!

D

DebbieV

Hi
I know it can be done but it escapes me at this stage. Please help!!!

I have a spreadsheet which looks like

A B
1 Dog 12/7/07
2 Cat 13/7/07
3 Dog
4 Dog 12/7/07
5 Cat
6 Dog 12/7/07
7 Dog 12/7/07


I want to return a count of the number of times that dog occurs in
column A and has a corresponding value in column B (is not blank) - so
in this case answer would be 4. I also then want to multiply the
answer by 150 (4*150).

Can someone help?

cheers
Debbie
 
T

Toppers

=SUMPRODUCT(--(a2:a100="Dog"),--(b2:B100<>""))*150

Better to put "Dog" in a cell:

=SUMPRODUCT(--(a2:a100=X1),--(b2:B100<>""))*150

HTH
 
D

DebbieV

=SUMPRODUCT(--(a2:a100="Dog"),--(b2:B100<>""))*150

Better to put "Dog" in a cell:

=SUMPRODUCT(--(a2:a100=X1),--(b2:B100<>""))*150

HTH










- Show quoted text -

Thanks Pete - worked beautifully!
 

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