Can countif formula use wildcard and only return number of unique entries with the wildcard?

torchedya

New Member
Joined
Dec 22, 2017
Messages
4
So I have a spreadsheet that has a column that has device names hostnames. For example the names look similar to these: ups-park-5g98, emu-chic-8t56. I am using a countif formula to count all entries that have emu in the name using "*emu*", but while doing so I see that some of the emu names are listed multiple times. I only want the formula to count each name once. Is there a way to do this in the formula? Remember that all the hostnames in column do not have emu in them and the emu hostnames may not be in the same lines in the column every time as this is coming from a report that is ran weekly.

Thanks!!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
maybe something like....

Excel 2016 (Windows) 32 bit
ABC
2emu-chic-8t563
3chic-emu-254
4emu-chic-8t56
5chic-8t52-emu
6chic-8t52-emu
7
8
9
10

<tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
C2{=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH("emu",A2:A10)),MATCH(A2:A10,A2:A10,0)),ROW(A2:A10)-ROW(A2)+1),1))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
ABC
2emu-chic-8t56ch3
3chic-emu-254il
4emu-chic-8t56ch
5chic-8t52-emuil
6chic-8t52-emuch
7
8
9
10


<colgroup><col width="64" style="width: 48pt;" span="4">
<tbody>




























































</tbody>
Lets say column B is the server that the device resides on. I still want to use the formula you gave but I want to add the condition that it only counts the emu's on server ch. Is this possible?
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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