Fun with COUNT and AND functions.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Okay... i'm trying to count the amount of times 2 different values appear in
a row.
ie basically, how many rows the number '4' occurs in column 'b' and
'toronto' occurs is column 'c'.
it can only count rows where both cases are true.
I just can't make it work.

lil help?
 
Darn...I typed B's instead of 4's:

Here're the corrected versions:

=SUMPRODUCT((B10:B100=4)*(C10:C100="toronto"))
or
=SUMPRODUCT(--(B10:B100=4),--(C10:C100="toronto"))

Again...Adjust range references to suit your situation
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
Try this:

=SUMPRODUCT(--(B1:B20=4),--(C1:C20="toronto"))

Adjust your range as needed.

HTH,
Paul
 
Is there any way to add wildcard values to this formula? it may be maditory
for what i need to do.
 
Perhaps this:
=SUMPRODUCT((B10:B100=4)*ISNUMBER(SEARCH("toronto",C10:C100)))

If you're referencing another sheet...try this version:
=SUMPRODUCT(('Sheet 01'!B10:B100=4)*ISNUMBER(SEARCH("toronto",'Sheet
01'!C10:C100)))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
That is EXACTLY what i need!

Thanks a lot!

Ron Coderre said:
Perhaps this:
=SUMPRODUCT((B10:B100=4)*ISNUMBER(SEARCH("toronto",C10:C100)))

If you're referencing another sheet...try this version:
=SUMPRODUCT(('Sheet 01'!B10:B100=4)*ISNUMBER(SEARCH("toronto",'Sheet
01'!C10:C100)))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
I'm glad I could help!....thanks for letting me know.

***********
Regards,
Ron

XL2003, WinXP
 

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

Back
Top