Conditional Formatting Partial Match

n3sky

New Member
Joined
Oct 24, 2011
Messages
4
I apologize in advance if this is already posted somewhere - I searched the forum for about 30 minutes and wasn't able to find the answer.

I'm trying to find a formula that will ignore text when searching for exact matches contained within the same column. For example, the column contains the following:

WS-X4606-X2-E
WS-X4606-X2-E=
WS-X4606-X2-E=

The = should be ignored and these should all be highlighted as an exact match.

Any help would be greatly appreciated!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I apologize in advance if this is already posted somewhere - I searched the forum for about 30 minutes and wasn't able to find the answer.

I'm trying to find a formula that will ignore text when searching for exact matches contained within the same column. For example, the column contains the following:

WS-X4606-X2-E
WS-X4606-X2-E=
WS-X4606-X2-E=

The = should be ignored and these should all be highlighted as an exact match.

Any help would be greatly appreciated!
Maybe something like this...

Conditional Formatting
Use a Formula...

=SEARCH("WS-X4606-X2-E",A1)
 
Upvote 0
Thanks for the reply. Unfortunately that won't work since there are lots of different text possibilities. Here's more of the spreadsheet:


WS-X4612-SFP-E
WS-X4612-SFP-E=
WS-X4624-SFP-E
WS-X4624-SFP-E=
WS-X4648-RJ45-E
WS-X4648-RJ45-E=

The formula should highlight all of these as duplicates. WS-X4612-SFP-E matches WS-X4612-SFP-E= (without the equal sign) and so on.
 
Upvote 0
Thanks for the reply. Unfortunately that won't work since there are lots of different text possibilities. Here's more of the spreadsheet:


WS-X4612-SFP-E
WS-X4612-SFP-E=
WS-X4624-SFP-E
WS-X4624-SFP-E=
WS-X4648-RJ45-E
WS-X4648-RJ45-E=

The formula should highlight all of these as duplicates. WS-X4612-SFP-E matches WS-X4612-SFP-E= (without the equal sign) and so on.
The = sign on the end...

Is that the only "odd" character that you want to ignore?
 
Upvote 0
Yes, the = is the only character that needs to be ignored.
You can use a formula like this:

Book1
AB
2WS-X4612-SFP-ETRUE
3WS-X4612-SFP-E=TRUE
4WS-X4624-SFP-ETRUE
5WS-X4624-SFP-E=TRUE
6WS-X4648-RJ45-ETRUE
7WS-X4648-RJ45-E=TRUE
8WS-X4648-RJ49-E=FALSE
Sheet1

=SUMPRODUCT(--(SUBSTITUTE(A$2:A$8,"=","")=SUBSTITUTE(A2,"=","")))>1
 
Upvote 0
Thank you! This is very close to working. The only problem is for some reason it's one cell off. Here's an example:

ASA5550-BUN-K9
C2960S-STACK
C2960S-STACK=
C3KX-NM-10G
C3KX-NM-10G=
C3KX-NM-1G
C3KX-NM-1G=

It's highlighting all but C3KX-NM-1G= as having a match, even though there is no other ASA5550-BUN-K9, and there is a non-equal sign match for C3KX-NM-1G=. Any idea why that would be occurring? Also, is it possible to have the formula ignore blank cells?

Thanks again!
 
Upvote 0
Thank you! This is very close to working. The only problem is for some reason it's one cell off. Here's an example:

ASA5550-BUN-K9
C2960S-STACK
C2960S-STACK=
C3KX-NM-10G
C3KX-NM-10G=
C3KX-NM-1G
C3KX-NM-1G=

It's highlighting all but C3KX-NM-1G= as having a match, even though there is no other ASA5550-BUN-K9, and there is a non-equal sign match for C3KX-NM-1G=. Any idea why that would be occurring? Also, is it possible to have the formula ignore blank cells?

Thanks again!
This works for me...

Book1
AB
2ASA5550-BUN-K9FALSE
3FALSE
4C2960S-STACKTRUE
5C2960S-STACK=TRUE
6C3KX-NM-10GTRUE
7C3KX-NM-10G=TRUE
8C3KX-NM-1GTRUE
9C3KX-NM-1G=TRUE
Sheet1

=SUMPRODUCT(--(A$2:A$9<>""),--(SUBSTITUTE(A$2:A$9,"=","")=SUBSTITUTE(A2,"=","")))>1

Have you considered doing an Edit>Replace to remove those equal signs from the data altogether?
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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