+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting duplicates with and without wildcard asterix

  1. #1
    Registered User
    Join Date
    04-03-2020
    Location
    Sweden
    MS-Off Ver
    2015
    Posts
    8

    Question Conditional formatting duplicates with and without wildcard asterix

    Problem: I have a column with article numbers. I need to find and highlight any duplicates. This does not work when the number involves wildcards, such as *.

    For instance:
    123-abc this one is not highlighted
    123-abc* this one is highlighted

    I need to solve two scenarios.

    Scenario 1: I want to highlight duplicate values regardless of character. So I want wildcards to be included.

    For instance:

    123-abc
    123-abc*
    None should be highlighted.

    Scenario 2
    : I want to highlight duplicate values while ignoring everything but numbers and letters.

    For instance:

    123-abc
    123-abc*
    Both should be highlighted.

    My solution for scenario 2 would be to manually remove all special characters, but I need to keep the original description as well. Can be done, but wondering if there is a more elegant way than creating new columns and such.

    Thank you so much!
    Last edited by holtsmeister; 04-22-2020 at 04:52 AM.

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Conditional formatting duplicates with and without wildcard asterix

    Have you got example in the file?

  3. #3
    Registered User
    Join Date
    04-03-2020
    Location
    Sweden
    MS-Off Ver
    2015
    Posts
    8

    Re: Conditional formatting duplicates with and without wildcard asterix

    Sorry. Here's example file.

    Needed to update the example too since the one I gave actually gave the correct behavior for scenario 1 for some reason.
    Attached Files Attached Files

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Conditional formatting duplicates with and without wildcard asterix

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    or in name and then in CF
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-03-2020
    Location
    Sweden
    MS-Off Ver
    2015
    Posts
    8

    Re: Conditional formatting duplicates with and without wildcard asterix

    Thank you!

    I've played around with it but still run into issues. I addeda few more test cases and this seems to break the code. In scenario 1, I added an actual duplicate but there is no highlight. Scenario 2 ignores * at the end of a string, but putting the * in the front doesn't seem to work.

    And what is even more annoying. I added another sheet to test your code, but it doesn't work after I copied it to Sheet 2? This one drives me insane!
    Attached Files Attached Files

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Conditional formatting duplicates with and without wildcard asterix

    Could be here "123-*abc"?

+ 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. Conditional Formatting issue due to wildcard *
    By m1cks in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-21-2020, 08:45 AM
  2. VBA Conditional Formatting using wildcard
    By slohman in forum Excel General
    Replies: 8
    Last Post: 04-23-2014, 12:49 AM
  3. [SOLVED] Cannot get Conditional Formatting formula to work with wildcard characters.
    By Oscar Martin in forum Excel General
    Replies: 4
    Last Post: 01-19-2014, 12:52 PM
  4. [SOLVED] problem with using asterisk as wildcard in conditional formatting
    By nsterng1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2012, 01:34 PM
  5. [SOLVED] Conditional Formatting with a Wildcard
    By Orestees in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2012, 10:21 AM
  6. Conditional Formatting/Duplicates
    By vba-dev in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-21-2009, 04:19 PM
  7. help with conditional formatting duplicates
    By novice2430 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2008, 03:21 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