Count formula

mjmoon

Board Regular
Joined
Mar 1, 2005
Messages
249
I want to use the countif function to count data in A1..A50 if = "Boats" and if the data in column C1..C50 = "SeaRay". I know how to use the countif function for one condition but I have no idead how to use for two conditon as I have explained above. The end result should tell me how many SeaRay Boats I have on inventory along with all the other types I have.

Thank you in advance!
Marc
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi Marc

Use Sumproduct:

=SUMPRODUCT((A1:A50="Boats")+0,(C1:C50="SeaRay")+0)

you can replace the criteria (ie "Boats", "searay") with cell references holding these values.
 
Upvote 0
Thank you. What does the plus 0 mean and the end of each formula?

I also need a formula to sum the data in D1..D50 if A1..A50 = Boats and if C1..C50 = Sea Ray. Any suggestions?

Marc
 
Upvote 0
=SUMPRODUCT((A1:A50="Boats")+0,(C1:C50="SeaRay")+0,D1:D50)

The +0 coerces the generated list of True/Falses to 1s/0s so that they can be used in mathematical operations. You may also see *1 and -- used instead of +0. Another alternative is to carry out the coercion implicitly by multiplying all the terms together:

=SUMPRODUCT((A1:A50="Boats")*(C1:C50="SeaRay")*D1:D50)
 
Upvote 0

Forum statistics

Threads
1,224,798
Messages
6,181,038
Members
453,013
Latest member
Shubashish_Nandy

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