COUNTIF ignoring certain text

KyleMcCarthy

New Member
Joined
Mar 29, 2019
Messages
2
Hello,

I have the following COUNTIF that works well, but recently realized it's not useful given there are duplicates, thus throwing off my numbers.

=COUNTIF($A$1:$X$145, "*"&A213&"*")

I have a table of text spanning from A1 through X145 of server names. Given the server, the exact name could show up multiple times.
The problem is as follows:

I have a server named ABCLOG, that on it's own, shows up seven times. But then I have another server named ABCLOGOffsite that shows up 3 times, and another server named ABCLOGWarmsite that shows up three times.

The goal is to have each server's EXACT name display the amount of times it shows up. However, when I do it, ABCLOG returns a number of 13 instead of seven.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Is it just the server name in the cells, if so try:
Code:
=COUNTIF($A$1:$X$145,A213)
 
Upvote 0
I suppose you have 4 cases to count:
"ABCLOG"
"ABCLOG space" any
any "space ABCLOG"
any "space ABCLOG space" any


Try:

=COUNTIF($A$1:$X$145,A213)+COUNTIF($A$1:$X$145,A213&" *")+COUNTIF($A$1:$X$145,"* "&A213)+COUNTIF($A$1:$X$145,"* "&A213&" *")
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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