Count If Two Columns Contain Specific Data

davidlachnicht

New Member
Joined
May 10, 2004
Messages
26
Accoridng to Microsoft Excel Help, the following formula should work:

=SUM(IF(B5:B25="Northwind",IF(C5:C25="Western",1,0)))

This should report the number of occurances where a row contains Northwind in column B -and- Western in column C.

I tried it exactly - it doesn't work.

Cut and paste from Excel Help:

>> Count the occurrences of multiple conditions
>> In the following formula, whenever Excel finds "Northwind" in the range
>> B5:B25, it then checks for the text "Western" in the same row in
>> column C (the range C5:C25). Excel then calculates the number of
>> rows that contain both.
>>
>> =SUM(IF(B5:B25="Northwind",IF(C5:C25="Western",1,0)))
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
davidlachnicht said:
Accoridng to Microsoft Excel Help, the following formula should work:

=SUM(IF(B5:B25="Northwind",IF(C5:C25="Western",1,0)))

This should report the number of occurances where a row contains Northwind in column B -and- Western in column C.

I tried it exactly - it doesn't work.

Cut and paste from Excel Help:

>> Count the occurrences of multiple conditions
>> In the following formula, whenever Excel finds "Northwind" in the range
>> B5:B25, it then checks for the text "Western" in the same row in
>> column C (the range C5:C25). Excel then calculates the number of
>> rows that contain both.
>>
>> =SUM(IF(B5:B25="Northwind",IF(C5:C25="Western",1,0)))

The formula should be entered as an arrary...CTRL+SHIFT+ENTER.

A non array

=SUMPRODUCT(--(B5:B25="Northwind"),--(C5:C25="Western"))
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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