Results 1 to 4 of 4

Thread: cell color formatting based on values
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Dec 2018
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default cell color formatting based on values

    Hello,

    i'm after a way to change a cells color based on the value of that cell in relation to the value in an adjoining cell. essentially what the actual value is in relation to the target value.
    if the actual value cell is lower than the target value cell then i want it to turn red, and green if its higher than or equal to.

    i realise that conditional formatting can be used for this. it works ok for the red option, but when it comes to choosing greater than or equal to on the green option it makes the cell green even if the target value cell is empty (because its equal to the nil value).

    is there a better way of doing this?

  2. #2
    Board Regular kweaver's Avatar
    Join Date
    May 2018
    Location
    La Jolla, CA
    Posts
    644
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default Re: cell color formatting based on values

    Have you tried making the green rule:

    Code:
    =AND(A1>=B1,B1<>"")

  3. #3
    MrExcel MVP
    Join Date
    Aug 2010
    Location
    Rio de Janeiro BRAZIL
    Posts
    16,272
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    8 Thread(s)

    Default Re: cell color formatting based on values

    You can use a formula in Conditional Formatting with an AND condition.

    Assuming A1 is the cell of interest and B1 is the target, this should work
    =AND(A1<>"",B1<>"",A1>=B1)

    M.

  4. #4
    New Member
    Join Date
    Dec 2018
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: cell color formatting based on values

    Thanks, that works great

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •