+ Reply to Thread
Results 1 to 7 of 7

How to highlight a row in a color based on text in a cell on that row?

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    2007
    Posts
    8

    How to highlight a row in a color based on text in a cell on that row?

    I have a spreadsheet I use to mark inventory as received back into a warehouse. We use 3 different colors on the Line Item's row to say if it is back in the warehouse, being return or back in the warehouse. Green is not in the warehouse, orange is coming back and yellow is in the warehouse.

    So, what I want to do is make it so when I put a "YES" in Cell Q8 it highlights A8-R8 in orange and doesn't change anything else.
    And If I put a YES in BOTH Q8 and R8 it highlights cells A8 through R8 in yellow and doesn't change anything else.

    And of course, I would need to apply this to every row

    Is there a way to do this?
    Last edited by wgilles; 10-23-2014 at 04:23 PM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to highlight a row in a color based on text in a cell on that row?

    Use conditional formatting on range A8:Q8. Use formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Format to suit.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    2007
    Posts
    8

    Re: How to highlight a row in a color based on text in a cell on that row?

    Thanks. I edited my OP a little bit...I forgot to add a condition for another color.

  4. #4
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    2007
    Posts
    8

    Re: How to highlight a row in a color based on text in a cell on that row?

    Quote Originally Posted by Olly View Post
    Use conditional formatting on range A8:Q8. Use formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Format to suit.
    Thanks, that worked. Question for this though. My sheet has 50+ rows and I want the same formatting to apply to each row. Will I have to enter this formatting for each individual row, or is there a way to copy it across the selection I make.

    For example, if Q8 has a yes, I want that to be highlighted like I said...but if Q9 doesn't have a yes, I want it to remain the default color until I change it to Yes.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to highlight a row in a color based on text in a cell on that row?

    Okay, add two conditions to your conditional formatting:

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

    Format to suit, select "Stop if true"

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

    Format to suit

    You can apply this conditional formatting to the whole range you want it to apply to - the column references are absolute, the row references relative, so you can simply change the "Applies to" range for each rule.

  6. #6
    Registered User
    Join Date
    10-23-2014
    Location
    NJ
    MS-Off Ver
    2007
    Posts
    8

    Re: How to highlight a row in a color based on text in a cell on that row?

    Quote Originally Posted by Olly View Post
    Okay, add two conditions to your conditional formatting:

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

    Format to suit, select "Stop if true"

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

    Format to suit

    You can apply this conditional formatting to the whole range you want it to apply to - the column references are absolute, the row references relative, so you can simply change the "Applies to" range for each rule.
    Got it, thank you. One last question. Is there a way to highlight a row a completely different color (ie red) if I want to do that manually. I just tried doing it with those conditions and it won't let me change the color.

    Is there some way to a manual override if I chose to?

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: How to highlight a row in a color based on text in a cell on that row?

    Conditional formatting will always override manual formatting - that's the point.

    I'd suggest if you want a manual override to set up another conditional formatting rule, based on a manual entry in another column (make it the first rule, set Stop if true).

+ 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. Highlight text only(not cell) in a certain color
    By jayanthi_d in forum Excel General
    Replies: 15
    Last Post: 05-05-2014, 04:08 PM
  2. [SOLVED] Highlight row a certain color based on a character from a cell
    By ory182003 in forum Excel General
    Replies: 3
    Last Post: 05-11-2013, 06:15 PM
  3. Fill color columns based on Highlight Cell Rules
    By buntalan80 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2013, 09:34 AM
  4. Replies: 8
    Last Post: 03-30-2012, 07:52 PM
  5. change text color based on adjacent cell text color
    By matthewst in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2005, 03:49 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