Duplicate text values in a column

AFZAL SOHAIL

Board Regular
Joined
May 31, 2023
Messages
115
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
I have data file in which a coloumn c have the following text strings, you see that sr.no.1 & sr.no.13, sr.no.2 and sr.4 are the same, I want to identify through formula the conditional formatting is not working because some are order is not same but they are the same faults, kindly help me
18041-GTN to DC-44 Firdous Market
2FZRD: OLT-1 to C-5 Pak Arab Society
38061-ARZ (2/0/7) to C-3/4 Bhobhtian Chowk
4FRZD: OLT-1 to C-5 Pak Arab Society
5SMD: MSAG-37 GOR-III to C-32 Cricket House GOR-II & C-3 Rehmania Park
6C-13 Truck Stand Adda to SMD: OLT-1
7Bhobhtian Chowk to 8061-ARZ (2/0/7) and C-3/4
88061-ARZ (11/0/7) to C-3/4 Bhobtian Chowk Defence Road
9SMD: OLT-1 to C-13 Truck Stand Adda
10FZRD: FZRD OLT-1 to MSAG-58 Near Advance Fashion
11Firdous Market to 8041-GTN DC-44
128061-ARZ (2/0/7) to C-3/4 Bhobhtian Chowk Defence Road
13FZRD: OLT-1 to MSAG-58 near Advance Fashion
 
Thanks a lot Sir,
I share the print screen preview before applying conditional formatting of your formula and after applying your formula of conditional formatting.
Sir, I want to know that it is possible to break the cell entry cut into two ends on the basis of " to "" in the cell entry in column-B
and after these two ends results match with colmn-b entry separately
 

Attachments

  • before applying conditional formating-2.jpg
    before applying conditional formating-2.jpg
    52.4 KB · Views: 5
  • after applying conditional formating-3.jpg
    after applying conditional formating-3.jpg
    54.4 KB · Views: 4
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks a lot Sir,
I share the print screen preview before applying conditional formatting of your formula and after applying your formula of conditional formatting.
Sir, I want to know that it is possible to break the cell entry cut into two ends on the basis of " to "" in the cell entry in column-B
and after these two ends results match with colmn-b entry separately
When you are looking for duplicates, are you comparing each value in column A ONLY to the values in column B, or are you also looking for the entry in column A to ALSO match other entries in column A?
 
Upvote 0
I just saw your attachments.
It sounds like you want to insert two columns so you can separate the values in your list, but your AFTER screen print does NOT show that. It only shows Conditional Formatting in place, which is what I already gave you.

So it is still not clear to me what you want, as I already gave you what you are showing in that second screen print.
 
Upvote 0
Sir,
I want to break the B-col into two pieces on the basis of word "to", i mean break it before word "to",
and after word "to" in cell entry.
And after match these cut pieces of data match with cell entry into Col-B
Thanks a lot too much for your quick response.
 
Last edited:
Upvote 0
OK, then you will need to first insert two blank columns at column C and column D.

Then, enter this formula into cell C6:
Excel Formula:
=LEFT(B6,FIND(" to ",B6)-1)
and enter this formula in cell D6:
Excel Formula:
=MID(B6,FIND(" to ",B6)+4,LEN(B6))
and then copy all the way down to the last row with data in column B.

Then, to conditional format/highlight the values in column C which are also found in column D, select the cells starting from cell C6 down to the last cell with values in column C.
Then enter in this Conditional Formatting formula:
Excel Formula:
=COUNTIF($D:$D,$C6)>0
and select your desired formatting color.

Based on your original data, the results would look like this:
1685708410682.png
 
Upvote 0
Solution
Sir,
Very very thankful to you, my problems is almost solved,
If you have another trick to solve like these problems kindly share it.
Thanks again Sir,
 
Upvote 0
Very very thankful to you, my problems is almost solved,
If you have another trick to solve like these problems kindly share it.
Is there some part of your question which is still not answered?

The only "trick" is to learn various Excel functions and Conditional Formatting.
The great thing is, most of that can be found on-line rather easily.
For example, if you do a search on "Excel COUNTIF function", you will see many different tutorials, explanations, and examples that show you how to use it.
 
Upvote 0
Thank you Sir for your advice, my problem is solved but I am only want to know for my knowledge , if I match the col-c or col-d with col-b what will be
the formula for this?
Again thanks Sir,
 
Upvote 0
Thank you Sir for your advice, my problem is solved but I am only want to know for my knowledge , if I match the col-c or col-d with col-b what will be
the formula for this?
Again thanks Sir,
The key is the COUNTIF function, like I showed you in my previous posts:
Excel Formula:
=COUNTIF($D:$D,$C6)>0
The logic behind it is quite basic. You would use this formula to Conditional Format cell C6.
All that it is saying is to count the number of entries in column D that match the value of cell C6.
If that value is greater than 0 (meaning that there is at least one match), then highlight that cell.

You can use this same function on any cells and columns you want. Just change your ranges to match your needs.
 
Upvote 0

Forum statistics

Threads
1,215,167
Messages
6,123,401
Members
449,098
Latest member
ArturS75

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