COUNTIF(B1:B5=the value "20" & A1:A5=the lette

dw8ite

New Member
Joined
Aug 2, 2007
Messages
3
I need help with a formula that will do what is stated in the Subject line. I know this isn't correct, but it explains the result I'm shooting for. How do I test both columns A & B and return the number of cells where the test is passed?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Cant see whole of the subject line....
Whats the formula you need?
 
Upvote 0
Can you post the subject again? It is cut off after "...A1:A5=the lette"

Based on your subject, the first part should be =COUNTIF(B1:B5,"=20")
 
Upvote 0
counting for 2 conditions:

=sumproduct(--(range1=contidtion1),--(range2=condition2))

so:

sumproduct(--(a1:a5="a"),--(b1:b5=20))

...or whatever
 
Upvote 0
Thanks for the reply and sorry the subject line was truncated. The formula was COUNTIF(B1:B5=the value "20" & A1:A5=the letter "s").
 
Upvote 0
You need:

=SUMPRODUCT(--(A1:A5="S"),--(B1:B5=20))
 
Upvote 0
Thanks so much...SUMPRODUCT(--(A1:A5="S"),--(B1:B5=20)) did the trick. I thought SUMPRODUCT was some sorta multiplication formula.
Oh well.

Thanks again.
 
Upvote 0
Your very welcome:

Taken from excel help:

SUMPRODUCT returns the sum of the products of corressponding ranges or arrays.

:)
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

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