john3j
05-05-2009, 09:20 AM
Hey guys can someone help me write code to color code a range? I actually have two ranges, K7:K87 and L7:L87.
For K7:K87 I need the following formatting to be done.
If the value of the cell in column "I" divided by the value of the cell in column "C" is >= "0.9", then color the cell in Column "K" red with bold font.
If the value of the cell in column "I" divided by the value of the cell in column "C" is < ".75", then color the cell in Column "K" White with bold font.
If the value of the cell in column "I" divided by the value of the cell in column "C" is between ".76" and ".89", then color the cell in Column K Orange with bold font.
This needs to be done for each row in the range.
Next I need the following done:
For the Range L7:L87
If the value of the cell in column "J" divided by the value of the cell in column "D" is >= "0.9", then color the cell in Column "K" red with bold font.
If the value of the cell in column "J" divided by the value of the cell in column "D" is < ".75", then color the cell in Column "K" White with bold font.
If the value of the cell in column "J" divided by the value of the cell in column "D" is between ".76" and ".89", then color the cell in Column K Orange with bold font.
I think this would be a select case but im not quite sure as how to do it. Any help would be appreciated.:banghead:
For K7:K87 I need the following formatting to be done.
If the value of the cell in column "I" divided by the value of the cell in column "C" is >= "0.9", then color the cell in Column "K" red with bold font.
If the value of the cell in column "I" divided by the value of the cell in column "C" is < ".75", then color the cell in Column "K" White with bold font.
If the value of the cell in column "I" divided by the value of the cell in column "C" is between ".76" and ".89", then color the cell in Column K Orange with bold font.
This needs to be done for each row in the range.
Next I need the following done:
For the Range L7:L87
If the value of the cell in column "J" divided by the value of the cell in column "D" is >= "0.9", then color the cell in Column "K" red with bold font.
If the value of the cell in column "J" divided by the value of the cell in column "D" is < ".75", then color the cell in Column "K" White with bold font.
If the value of the cell in column "J" divided by the value of the cell in column "D" is between ".76" and ".89", then color the cell in Column K Orange with bold font.
I think this would be a select case but im not quite sure as how to do it. Any help would be appreciated.:banghead: