Consulting

Results 1 to 6 of 6

Thread: Solved: Conditional Formatting only when value is present

  1. #1
    VBAX Newbie
    Joined
    Apr 2008
    Posts
    3
    Location

    Solved: Conditional Formatting only when value is present

    Hi

    I've run into a problem that I haven't been able to find a solution for yet and was hoping someone could help me with it. I have worksheet with 12 columns with the data arranged in rows. For each row, there may be 2 to 12 entries. I'm trying to use conditional formatting to fill the cells of the highest (green) and lowest (red) values, but only for those cells that contain data. Data is numeric only.
    Right now, it works once I enter the values, but blank rows are all filled with green and values of 0 result in that cell and every other blank cell in the row to be filled with red.
    I am using the cell value equal to =MAX($A11:$L11) for the highest value and =MIN($A11:$L11) for the lowest, in that order.
    Do I need to resort to VBA for this ?

    Thanks in advance !
    Attached Files Attached Files

  2. #2
    Hi Henry,

    Welcome to the forum!!

    Have a look at the attached where I've added another condition where if the cell is blank (value equals zero) there's no formatting.

    HTH

    Robert
    Attached Files Attached Files

  3. #3
    VBAX Newbie
    Joined
    Apr 2008
    Posts
    3
    Location
    Robert

    Thank you for the quick reply. The only shortcoming of that method is the value of 0 does not get filled with red, even though it is the lowest value of the data entered. Still, this solution works better than what I started with !

  4. #4
    Ah, good point!!

    Have a look at the attached then where I've put in a formula for the first CF condition.

    HTH

    Robert
    Attached Files Attached Files

  5. #5
    VBAX Newbie
    Joined
    Apr 2008
    Posts
    3
    Location
    Perfect I actually tried using LEN in some convoluted way that just didn't work. Thank you for your help !

  6. #6
    You're welcome. I'm glad it's all sorted

Posting Permissions

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