Results 1 to 20 of 76

Thread: Colour Entire Row Base on the Value of Two Other Cells

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jun 2015
    Posts
    67
    Location

    Colour Entire Row Base on the Value of Two Other Cells

    Hi,
    I'm having problems with conditional formatting. Conditional Formatting using the built in Excel formatting seems to require very long formulas for what I wish to achieve. I was hoping to get help coding with VBA instead.
    I have attached a more exact example of my problem. Basically I want to colour each row based on the values in row "G" and "O'. They can be Red, Green, Blue or Black.
    Cond Format.jpg
    Below is my Excel Conditional Format effort for most of the conditions but does not include the ISBLANK in most cases. I am hoping that VBA will be simpler.

    =IF(AND(ISBLANK($G$11),ISBLANK($O$11)),TRUE,FALSE)   
    =IF(AND(($G$11<=20),ISBLANK($O$11)),TRUE,FALSE)
    =IF(AND(AND(($G$11>20),( $G$11<=50)),ISBLANK($O$11)),TRUE,FALSE)
    =IF(AND(AND(($G$11>50),( $G$11<=100)),ISBLANK($O$11)),TRUE,FALSE)
    =IF(AND(AND(($G$11>100)),ISBLANK($O$11)),TRUE,FALSE)
    =IF(AND(ISBLANK($G$11),( $O$11<=7)),TRUE,FALSE)
    =IF(AND(($G$11<=20),( $O$11<=7)),TRUE,FALSE)
    =IF(AND($G$11>20, $G$11<=50, $O$11<=7),TRUE,FALSE)
    =IF(AND($G$11>50, $G$11<=100, $O$11<=7),TRUE,FALSE)
    =IF(AND($G$11>100, $O$11<=7),TRUE,FALSE)
    =IF(AND(ISBLANK($G$11),( $O$11>7), $O$11<=30),TRUE,FALSE)
    =IF(AND($G$11<=20, $O$11>7, $O$11<=30),TRUE,FALSE)
    =IF(AND($G$11>20, $G$11<=50, $O$11<=30),TRUE,FALSE)
    =IF(AND($G$11>50, $G$11<=100, $O$11>7, $O$11<=30),TRUE,FALSE)
    =IF(AND($G$11>100, $O$11>7, $O$11<=30),TRUE,FALSE)
    =IF(AND(ISBLANK($G$11),( $O$11>30), $O$11<=60),TRUE,FALSE)
    =IF(AND($G$11<=20,$O$11>30, $O$11<=60),TRUE,FALSE)***
    =IF(AND($G$11>20, $G$11<=50, $O$11>30, $O$11<=60),TRUE,FALSE)
    =IF(AND($G$11>50, $G$11<=100, $O$11>30, $O$11<=60),TRUE,FALSE)
    =IF(AND($G$11>100, $O$11>30, $O$11<=60),TRUE,FALSE)
    =IF(AND(ISBLANK($G$11),( $O$11>60)),TRUE,FALSE)
    =IF(AND(($G$11<=20),( $O$11>60)),TRUE,FALSE)
    =IF(AND($G$11>20, $G$11<=50, $O$11>60),TRUE,FALSE)
    =IF(AND(($G$11>100),( $O$11>60)),TRUE,FALSE)
    =IF(AND($G$11>50, $G$11<=100, $O$11>60),TRUE,FALSE)
    The columns with "TRUE" or "FALSE", only represent the formulas that I would use for the formatting. In reality they would be TASK's i.e. "Replace Oil Filter"

    Many Thanks in Advance
    Attached Images Attached Images

Posting Permissions

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