Hi, here is the problem i am having
I have a worksheet which i need to check the condition of cell lets says k8=7 , if condition is true change the range of cells in this case A8:I8 to interior color = ? and font color = ? I then need to move 1 row down and perform the check again. k9=7, change the color of range A9:I9
I then need to add on if k8>7 then change interior and font color to a another color.
I can get it to check the first cell change the interior and font color as i need, but i cant get it to move down the required number of rows. in this case check cell value from i8 to i90 and change a8:i8 down a90:i90.
I have tried conditional formatting, but this does not seem to work.
here is some of the code i have tried, probably a million miles away
Sub check_dates2()
Range("a8").Activate
c = 1
Do While c <= 90
If Range("k8") = 7 Then
Range(ActiveCell, ActiveCell.Offset(0, 8)).Interior.ColorIndex = 3
Range(ActiveCell, ActiveCell.Offset(0, 8)).Font.ColorIndex = 36
ActiveCell.Offset(1, 0).Select
c = c + 1
End If
Loop
End Sub
any help would be appreciated.
Ally.
I have a worksheet which i need to check the condition of cell lets says k8=7 , if condition is true change the range of cells in this case A8:I8 to interior color = ? and font color = ? I then need to move 1 row down and perform the check again. k9=7, change the color of range A9:I9
I then need to add on if k8>7 then change interior and font color to a another color.
I can get it to check the first cell change the interior and font color as i need, but i cant get it to move down the required number of rows. in this case check cell value from i8 to i90 and change a8:i8 down a90:i90.
I have tried conditional formatting, but this does not seem to work.
here is some of the code i have tried, probably a million miles away
Sub check_dates2()
Range("a8").Activate
c = 1
Do While c <= 90
If Range("k8") = 7 Then
Range(ActiveCell, ActiveCell.Offset(0, 8)).Interior.ColorIndex = 3
Range(ActiveCell, ActiveCell.Offset(0, 8)).Font.ColorIndex = 36
ActiveCell.Offset(1, 0).Select
c = c + 1
End If
Loop
End Sub
any help would be appreciated.
Ally.