+ Reply to Thread
Results 1 to 11 of 11

Conditional Formatting for a range of cells

  1. #1
    Registered User
    Join Date
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Conditional Formatting for a range of cells

    Hi I'm trying to use conditional formatting in Excel 2019 to highlight a range of cells one color if they contain a a specific text/s and another color if they don't contain said specific text/s.

    example:
    If cell in column A contains the text "good" or "evil" or "bad" then highlight cell row from column L to column R GREEN, and if it doesn't contain either of those text then highlight RED

  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
    80,830

    Re: Conditional Formatting for a range of cells

    You will need an OR statement for the GREEN rule:

    =OR($A1="good",$A1="evil",$A1="bad)

    Applies to: L:R

    For RED, maybe this:

    =AND($A1<>"good",$A1<>"evil",$A1<>"bad)

    Applies to: L:R
    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
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Conditional Formatting for a range of cells

    @AliGW thanks that might work but how to I do the applies to part?? I selected the range that I wanted to an went to conditional formatting after that; but when I inputted the formula to use it only highlighted the cells that matched it in the first column of the selected range also I am/need to include basically all cells in the range and the actually range would include column A. So then the range would be from A:R and column A is where I want it to look for the specific texts and highlight the row that does/doesn't contain those text from A:R.

    I'm not sure if I'm actually making the above statement clear but I hope you or someone else that can help gets what I'm trying to say.

  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
    80,830

    Re: Conditional Formatting for a range of cells

    Please attach the workbook, then we can advise properly.

  5. #5
    Registered User
    Join Date
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Conditional Formatting for a range of cells

    I actually tried but for some reason my Attachment setting isn't working. I'm using Chrome and tried to fix my setting, cookies, cache, ect.. and nothing is allowing me to have the add attachment work.
    Attached Files Attached Files
    Last edited by TwistedFaith; 10-20-2019 at 05:52 AM.

  6. #6
    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,830

    Re: Conditional Formatting for a range of cells

    Instructions (Please Read Carefully):

    Unfortunately the attachment icon doesn't work at the moment (it hasn't worked for years, and despite our repeatedly asking the technical team who own the forum to fix it, they can't be bothered to do so), so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  7. #7
    Registered User
    Join Date
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Conditional Formatting for a range of cells

    ok I just edited my previous post and add it.

    FYI for that little text book I used a formula for column A:R to input random words based on a select few words. One list for column A and another list for column B:R and because of that it changes every time its refreshed

  8. #8
    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,830

    Re: Conditional Formatting for a range of cells

    Unfortunately you have not mocked up your expected results - please do this MANUALLY and post the workbook again.

  9. #9
    Registered User
    Join Date
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Conditional Formatting for a range of cells

    Ok here is the updated copy
    Attached Files Attached Files

  10. #10
    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,830

    Re: Conditional Formatting for a range of cells

    So, just a slight tweak of what I gave you before:

    =OR($A2="good",$A2="evil",$A2="bad")

    =AND($A2<>"good",$A2<>"evil",$A2<>"bad",$A2<>"")
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-18-2014
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    86

    Re: Conditional Formatting for a range of cells

    Thanks for all the help. That's exactly what I'm looking for.

+ 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. VBA to set conditional formatting range of cells
    By ahmedhammam29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2016, 01:00 PM
  2. Conditional formatting for a range of cells based on data from two cells
    By Tindomerel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2014, 05:09 AM
  3. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  4. Conditional formatting if a range of cells contain 1
    By Dibbley247 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2013, 06:54 PM
  5. Conditional Formatting for a range of cells
    By MyOnion in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2013, 05:09 AM
  6. Excel 2007 : Conditional Formatting to Range of Cells
    By lovesexcel in forum Excel General
    Replies: 3
    Last Post: 04-21-2011, 03:43 PM
  7. Conditional formatting - range of cells
    By kroz in forum Excel General
    Replies: 6
    Last Post: 03-09-2009, 07:58 AM

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