+ Reply to Thread
Results 1 to 9 of 9

How to use Conditional formatting for multiple text in cell range?

  1. #1
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    How to use Conditional formatting for multiple text in cell range?

    Hi forum,
    Just wondering how to conditional format multiple text in a given range.
    What i mean by this is some type of OR logic.
    so =OR($C:$C={"BASEBALL", "BASE", "BALL", "PIPE", "PIPE FAD"})
    But i cannot get it to work.
    Please find attached an example spreadsheet.

    Cheers,
    Julian
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: How to use Conditional formatting for multiple text in cell range?

    Hi Julian,

    may be there is a more elegant way but this works (due to redundancy in your "or" - only look for common substrings)

    =OR(IFERROR(IFERROR(SEARCH("BALL";B2);0); IFERROR(SEARCH("PIPE";B2);0))

    cheers,
    Guenter

  3. #3
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to use Conditional formatting for multiple text in cell range?

    Hello Guenter, thanks for the response,

    Unfortunately i get this error message when attempting to "OK" the formula.
    Attachment 656235


    I'm sure it can easily be fixed,
    Cheers, Julian

    EDIT: I FIXED IT, replaced ";" with ",", and added two extra brackets at the end.
    Attached Images Attached Images
    Last edited by JulianS96; 01-03-2020 at 06:07 AM.

  4. #4
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to use Conditional formatting for multiple text in cell range?

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

    EDIT 2: It only works for "BALL", not "PIPE"

  5. #5
    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
    80,460

    Re: How to use Conditional formatting for multiple text in cell range?

    You didn't replicate it correctly. Try this:

    =IFERROR(SEARCH("BALL",B2),IFERROR(SEARCH("PIPE",B2),0))
    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.

  6. #6
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to use Conditional formatting for multiple text in cell range?

    Thanks Ali,
    The solution seems so simple but I guess it always is, cheers for that.
    On a further note, if i wanted to add another criteria, would I nest IFERROR statements?
    E.g. =IFERROR(SEARCH("BALL",B2),IFERROR(SEARCH("PIPE",B2),IFERROR(SEARCH("TREE",B2),IFERROR(SEARCH("HOUSE",B2),0))

    Cheers,
    Julian
    Last edited by JulianS96; 01-03-2020 at 06:17 AM.

  7. #7
    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
    80,460

    Re: How to use Conditional formatting for multiple text in cell range?

    Yes, but you'll also need to increase the closing brackets on the right - one for each extra criterion.

  8. #8
    Forum Contributor JulianS96's Avatar
    Join Date
    11-01-2019
    Location
    England
    MS-Off Ver
    365 (work-99%), 2016 (home-1%)
    Posts
    266

    Re: How to use Conditional formatting for multiple text in cell range?

    good point, counting it there were 8 "(" and only 6 ")" .
    Should have idiot checked it, oh well.
    Thanks again!

  9. #9
    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
    80,460

    Re: How to use Conditional formatting for multiple text in cell range?

    No worries.

+ 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. Replies: 3
    Last Post: 05-06-2016, 06:39 AM
  2. Replies: 5
    Last Post: 06-12-2014, 09:23 AM
  3. Replies: 2
    Last Post: 12-25-2013, 10:55 AM
  4. Conditional Formatting for cell range covering multiple rows and columns
    By edp428 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2013, 02:02 PM
  5. Replies: 3
    Last Post: 06-25-2013, 04:41 AM
  6. Replies: 1
    Last Post: 06-02-2013, 04:00 PM
  7. Replies: 3
    Last Post: 10-09-2009, 01:34 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