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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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.
 
Upvote 0
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.
 
Upvote 0
Try

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

Forum statistics

Threads
1,215,575
Messages
6,125,628
Members
449,240
Latest member
lynnfromHGT

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