Countif question

Ben2k

Board Regular
Joined
Oct 16, 2002
Messages
77
Hi, can someone help me with this, I am trying to use the countif function like this

=COUNTIF(Sheet1!C2:C1000,"128MB PC100 SDRAM") and (Sheet1!E2:E1000,"Stock")

What I want is the system to count every row which has the two conditions met but it doesn't work. Is it possible to use the AND argument with COUNTIF or is there a better way?

Cheers

Ben
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi, welcome to the board.

You need to use either SUMPRODUCT or DCOUNT, or even an array formula with SUM()

Do a search on "multiple conditions", and you should get a lot of results that apply to your case.
 
Upvote 0
Ben

Substitute SUMPRODUCT for COUNTIF and a * for the and. Should get you there. Also instead of Pc Dram etc reference a cell that houses the phrase.
 
Upvote 0
On 2002-10-17 10:34, Brian from Maui wrote:
Ben

Substitute SUMPRODUCT for COUNTIF and a * for the and. Should get you there. Also instead of Pc Dram etc reference a cell that houses the phrase.

Hi Brian,

Thanks for your reply, I have tried using the following:

=SUMPRODUCT(Sheet1!C2:C1000,Sheet1!C2)*(Sheet1!E2:E1000,Sheet1!E2)

But it just returns #VALUE!,

Is this what you meant? For info C2 and E2 contain the phrases "128MB SDRAM PC100" and "Stock" as you mentioned.

Thanks

Ben
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,559
Members
448,970
Latest member
kennimack

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