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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
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.
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
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.
 

Ben2k

Board Regular
Joined
Oct 16, 2002
Messages
77
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
 

maxflia10

Well-known Member
Joined
May 20, 2002
Messages
890
Ben

See the post above
 

Ben2k

Board Regular
Joined
Oct 16, 2002
Messages
77
Many thanks guys, thats it!!

This is a great forum, think i'll stick around.
 

Forum statistics

Threads
1,181,094
Messages
5,928,043
Members
436,585
Latest member
Skyndt

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
Top