Count distinct (remove duplicate) strings that contains a specific text in an Excel column

wongced

New Member
Joined
Mar 21, 2018
Messages
3
Hi,

I have a long list of texts that I need to count how many are distinct (the first occurrence), but only with only contains the word "LOOP" in the text, all the text are in 1 column. I know I can do this with remove duplicates, but I will constantly update the list, so I hope there is a way to automatically update the value.

sample of my texts:
RING1_LOOP6
RING6_LOOP4
RING5_LOOP30
RING5
RING7_LOOP40
RING1_LOOP6
RING5_LOOP30

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>

so in above texts, the RING5 should not be counted, so the return value should be 4.
because, RING1_LOOP6, RING6_LOOP4, RING5_LOOP30, and RING7_LOOP40 only.


It will be very helpful if anyone can help me on this.
Thank you!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
DATA in A2:A8

ARRAY Formula

=SUM(IFERROR(1/(COUNTIF($A$2:$A$8,IF(ISNUMBER(FIND("LOOP",$A$2:$A$8)),$A$2:$A$8,"ZZZZZZ"))),0))

ARRAY formula is used


To enter ARRAY formula
Paste the formula
Press F2
Press Ctrl+Shift+Enter keys together.
formula will be covered with{} brackets by excel.
 
Upvote 0
1] Assume your data put in A2:A8

2] B2, enter formula :

=SUMPRODUCT(ISNUMBER(SEARCH("LOOP",A2:A8))/COUNTIF(A2:A8,A2:A8))

Regards
Bosco
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,716
Members
449,093
Latest member
Mnur

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