+ Reply to Thread
Results 1 to 13 of 13

VB Code to find duplicate and add character

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to find duplicate and add character

    Hello:

    Please refer to attached file.

    I have data as shown in Column A
    I need VB Code to find teh duplicate.
    Once found, highlight yellow and change one of the duplicate by adding 1,2,3 at the end as shown
    in column D

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: VB Code to find duplicate and add character

    Place in D2 and drag down

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to find duplicate and add character

    Hello Mumps1

    Thanks a lot it works great

    Riz

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    You are very welcome.

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to find duplicate and add character

    Hello Mumps:

    Please refer to attached file.

    I see some misses and some did not highlight Yellow.

    Pleae have a look Row 13

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    G13 has a trailing space. Remove the trailing space and try again.

  8. #8
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to find duplicate and add character

    Hello Mumps:

    Great show the problem and fixed.
    Would appreciate if it is feasible to add code to check if any trailing and remove if any.
    Also would it be possible to highlight the duplicted (Logic will be to highlight all cells with last character to be digit

    Please let me know if you have any questions.
    Thanks.

    Riz

  9. #9
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    Try:
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to find duplicate and add character

    Hello Mumps1:

    Thanks a lot

    Riz

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    My pleasure.

  12. #12
    Registered User
    Join Date
    07-04-2021
    Location
    Florida
    MS-Off Ver
    Microsoft 365
    Posts
    7

    Re: VB Code to find duplicate and add character

    Quote Originally Posted by Mumps1 View Post
    Try:
    Please Login or Register  to view this content.
    Would this code work with letters? Instead of 1 replacing duplicates with the letter B?
    I have tried and fail to do so. Thank you

  13. #13
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,882

    Re: VB Code to find duplicate and add character

    @enakH8
    Hello and welcome to the Forum. Please do not post your question in another member's thread. You should start a new thread. It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find duplicate emails with 1 or 2 wrong word or any character
    By jfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2020, 11:19 AM
  2. VB Code to find blank character
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2020, 10:41 PM
  3. How do you find and tag/code duplicate cells?
    By ZDan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-01-2019, 11:03 AM
  4. Need to find duplicate cell values from ONLY cells containing a specific character
    By m_roussakis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2018, 06:00 AM
  5. [SOLVED] VB Code to find and delete character from txt file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2016, 08:12 AM
  6. [SOLVED] VB Code to find row# with certain character
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-15-2016, 07:08 AM
  7. VB Code to find duplicate and delete row
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2015, 05:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1