Countif (again)

KII

New Member
Joined
Oct 27, 2002
Messages
33
I need to count if two seperate columns in a worksheet match a criteria.

Am I close...

=countif(c2:c193,"server") & countif(m2:m193,"victoria")

when using this formula I seem to get a strange answer. Do I need to use vlookup?

Any ideas...
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
Well, you're using the & operator. This will create a text value, not numeric. If you had 10 server entries and 5 victoria entries then your formula will give:-

10 & 5 = 105.

Change the & to a + and you should be OK.

This will of course, still give the total of 'server' plus the total of 'victoria' independantly of each other.
 

KII

New Member
Joined
Oct 27, 2002
Messages
33
Yeah, I tried that. I need to count only if the fields are "server and "victoria" if they differ then I don't want to count it.
 

maxflia10

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

=sumproduct((c2:c193="server")*(m2:m193="victoria"))
This message was edited by maxflia10 on 2002-10-28 11:52
 

Forum statistics

Threads
1,143,737
Messages
5,720,566
Members
422,291
Latest member
Deveshk

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