+ Reply to Thread
Results 1 to 4 of 4

Conditional Format cells containing specific characters

  1. #1
    Registered User
    Join Date
    06-25-2017
    Location
    Australia
    MS-Off Ver
    365
    Posts
    76

    Question Conditional Format cells containing specific characters

    I have spreadsheets that contain data like the following:

    2-5-7
    26-3-3
    14-10-1, 14-10-2

    ..etc. Numbers separated by dashes (and occasionally commas).

    Is there a way to use Conditional Formatting to highlight cells that contain only combinations of specific numbers?

    For example, I don't need to select cells that contain the characters 1 or 2 or 6 in them, but cells that contain ONLY those numbers (in any order).


    I suppose another way of explaining it is:

    Highlight cells that contain only the following characters: - , 0 1 2 6 8 9
    That way, a cell that contains the data 2-1-2 would be highlighted, but a cell that contains 2-1-3 would not.

    Can Conditional Formatting do this? Or is there some clever way using CTRL-F that I haven't realized?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional Format cells containing specific characters

    Please explain your logic. To me, this seems contradictory:

    I suppose another way of explaining it is:

    Highlight cells that contain only the following characters: - , 0 1 2 6 8 9
    That way, a cell that contains the data 2-1-2 would be highlighted, but a cell that contains 2-1-3 would not.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-25-2017
    Location
    Australia
    MS-Off Ver
    365
    Posts
    76

    Re: Conditional Format cells containing specific characters

    Highlight cells that contain only the following characters: - , 0 1 2 6 8 9
    2-1-2
    would be highlighted because it contains the the characters 2, 1, and -.


    2-1-3
    would NOT be highlighted because the character 3 is in there.


    If a cell contains any character (number, letter, whatever) other than "Dash Comma 0 1 2 6 8 9", then I don't need it highlighted. I only need the ones that contain those magic numbers (and a Comma or Dash).

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Conditional Format cells containing specific characters

    OK - that's clear now.

+ 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. Deleting specific characters in cells
    By zforzani in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2013, 12:25 PM
  2. [SOLVED] Conditional Format based on Number of Characters in a cell
    By Shadefalcon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-01-2012, 10:06 AM
  3. Conditional Format based on Number of Characters in a Cell
    By Shadefalcon in forum Excel General
    Replies: 1
    Last Post: 10-01-2012, 09:33 AM
  4. [SOLVED] Conditional Format Based on specific text in 3 different cells
    By tradersteve in forum Excel General
    Replies: 5
    Last Post: 11-08-2011, 06:49 AM
  5. Replies: 2
    Last Post: 11-07-2009, 05:45 PM
  6. How do I format a specific column of cells to have a limit aount of characters?
    By limshady411 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2005, 02:35 AM
  7. find cells that contain specific characters
    By mshornet in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-23-2005, 10:10 AM
  8. Replies: 4
    Last Post: 09-12-2005, 06:05 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