Count if with two scenarios

daytonshuman

New Member
Joined
Feb 23, 2007
Messages
6
I need to count rows that meet two criteria. Column B should equal "32456", and Column C should equal "FULLS". Both need to be met in order for it to count. Can someone help me with this. Thanks.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the board...

Sumproduct is good for this..

=SUMPRODUCT(--(B1:B100=32456),--(C1:C100="FULLS"))

You may or may not need to add quotes around the 32456, depends if your data in column B is numbers, or "numbers stored as text"

Note, ranges cannot be entire column refs like B:B, must use row #s.
Unless in xl2007 or higher, and even then it's not recommended.
 
Upvote 0
If you do happen to have Excel 2007+ then the COUNTIFS function is a more efficient way

=COUNTIFS(B1:B100,32456,C1:C100,"FULLS")
 
Upvote 0

Forum statistics

Threads
1,214,894
Messages
6,122,124
Members
449,066
Latest member
Andyg666

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