+ Reply to Thread
Results 1 to 9 of 9

select multiple text instances to conditionally format a row

  1. #1
    Registered User
    Join Date
    04-09-2015
    Location
    Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    select multiple text instances to conditionally format a row

    I want to highlight rows containing a specific country code. I managed to enter the formula to highlight all "BE" lines, but I can't find the right formula to add other countries in the same formula (eg I want to have NL CH BE DE SE etc...)

    excelforum_150814.JPG

    Here's the formula I'm using:
    =$D2="be"

    and anythinge else I tried does not work:
    =$D2="be,sg,nl,de"
    =$D2="be","sg","nl",
    =$D2="be";"sg","nl";
    =$D2=("be","sg","nl")
    and a few more versions

    I'm assuming it must be possible to have all the country codes I need in a single formula, otherwise I'd have to add it separately for all the countries I need.

    Thanks for any suggestions.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: select multiple text instances to conditionally format a row

    Hi there,

    Try:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: select multiple text instances to conditionally format a row

    Hi,

    Does this work for you?

    =OR($D2={"be","sg","nl"})
    Last edited by sweep; 08-14-2015 at 06:27 AM. Reason: Idiot typing!
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: select multiple text instances to conditionally format a row

    Another one:

    =ISNUMBER(MATCH($D2,{"BE","SG","NL"},0))

    Just add to the items within the curly brackets if you want more codes.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    04-09-2015
    Location
    Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: select multiple text instances to conditionally format a row

    This did the trick. Thanks Greg!

  6. #6
    Registered User
    Join Date
    04-09-2015
    Location
    Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: select multiple text instances to conditionally format a row

    This version did not work for me. Thanks for suggesting it anyway!

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: select multiple text instances to conditionally format a row

    Sweep had his $ symbol in the wrong place - should have been $D2

    Pete

  8. #8
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: select multiple text instances to conditionally format a row

    D'OH!

    Thanks Pete!

  9. #9
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: select multiple text instances to conditionally format a row

    Hi again,

    Many thanks for your feedback and also for the Reputation increase

    Glad I was able to help.

    Best regards,

    Greg M

+ 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. How to conditionally format cells using partial text
    By Cremorneguy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-26-2014, 11:26 AM
  2. [SOLVED] Conditionally Format Exact Text
    By georgedaly in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 06:26 AM
  3. Replies: 2
    Last Post: 02-10-2012, 04:32 PM
  4. Conditionally format numbers stored as text
    By jimojimo in forum Excel General
    Replies: 6
    Last Post: 04-28-2010, 11:45 AM
  5. How do I conditionally format only some of the text in a cell?
    By Goo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2006, 10:55 AM
  6. [SOLVED] insert text conditionally and format
    By John Sawyer in forum Excel General
    Replies: 3
    Last Post: 08-17-2005, 02:05 PM
  7. Extracting/look up data from a list and select multiple instances
    By Candice H. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2005, 12:06 PM

Tags for this Thread

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