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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
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,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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