hi there
I want to format Column CH based on value of percentage in column CI
Here's the conditions:
CONDITIONS:
Percent Colour Format
0% Brown
1% - 49.99% Black
50%-79.9% Red
80%-99.9% Yellow
>100% Green
Thanks for assistance
hi there
I want to format Column CH based on value of percentage in column CI
Here's the conditions:
CONDITIONS:
Percent Colour Format
0% Brown
1% - 49.99% Black
50%-79.9% Red
80%-99.9% Yellow
>100% Green
Thanks for assistance
[vba]
Sub test()
Dim Str As Long
With ActiveSheet
For Each c In Intersect(.UsedRange, .Columns("CI")).Cells
If Len(c.Value) > 0 Then
If IsNumeric(c.Value) Then
Select Case c.Value * 100
Case Is = 0
.Cells(c.Row, "CH").Interior.ColorIndex = 53
Case 1 To 49.9
.Cells(c.Row, "CH").Interior.ColorIndex = 0
Case 50 To 79.9
.Cells(c.Row, "CH").Interior.ColorIndex = 3
Case 80 To 99.9
.Cells(c.Row, "CH").Interior.ColorIndex = 6
Case Is > 100
.Cells(c.Row, "CH").Interior.ColorIndex = 10
End Select
End If
End If
Next c
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Hi Bob
That is wonderful, thank you so much.
Best regards,
Harto