Need to find similar text values within the same column

mpatino

Board Regular
Joined
Jul 8, 2009
Messages
82
Hi Guys,

Is there a way find within the same column all those values with similar characteristics, for example:

AB
1ValuesValidation
2ADAMSM8-RCD1Exclude
3ADAMSM9-RCD1Exclude
4ADAMS01-RCD1Exclude
5
BANK01-RCD1

<tbody>
</tbody>
Good
7
BARBER03-RCD1

<tbody>
</tbody>
Good
8
BEC05-RCD1

<tbody>
</tbody>
Good

<tbody>
</tbody>

In this table I have a set of values that are similar to each other before the dash, so what I'd like to do is to exclude all of them from my report, it is ok to have the same value after the dash.

Appreciate your help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You can always try creating a new column for the correct item:

Assume column A is holding your data:

=LEFT(A2,(FIND("-",A2,1)-1))

Then countif by your new field.
 
Upvote 0
I would say 4 characters would be a good number, I thought on counting characters, however I still don't know how to declare the similarity after I count the characters, because I can't tell that which ones have the same exact 4 characters at the beginning, for example:

1. BARB1 = First 4 characters = BARB
2. BARB2 = First 4 characters = BARB
3. RIOS1 = First 4 characters = RIOS
4. BELGIUM = First 4 characters = BELG
5. BELGIUM2 = First 4 characters = BELG
6. COKE = First 4 characters = COKE
7. LORENZO = First 4 characters = LORE

So I would need to declare similar 1 with 2 and 4 with 5 only, while 3, 6 and 7 should remain ok.
 
Last edited:
Upvote 0
I would say 4 characters would be a good number, I thought on counting characters, however I still don't know how to declare the similarity after I count the characters, because I can't tell that which ones have the same exact 4 characters at the beginning, for example:

1. BARB1 = First 4 characters = BARB
2. BARB2 = First 4 characters = BARB
3. RIOS1 = First 4 characters = RIOS
4. BELGIUM = First 4 characters = BELG
5. BELGIUM2 = First 4 characters = BELG
6. COKE = First 4 characters = COKE
7. LORENZO = First 4 characters = LORE

So I would need to declare similar 1 with 2 and 4 with 5 only, while 3, 6 and 7 should remain ok.

What is the output? The list of the records involving 1,2,4,5 or the list of records involving 3, 6, and 7?
 
Upvote 0

Forum statistics

Threads
1,215,633
Messages
6,125,928
Members
449,274
Latest member
mrcsbenson

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