View Single Post
  #2   Report Post  
Maurice
 
Posts: n/a
Default


I can't quite explain this, it was passed to me when i ran out of
conditional formats. It looks at a column, and based on the numeric
value in the column then colours the relevant cell. It is set on my
file to run on change event. This provides for ten variations, don't
know if it expands further than that

Sub Line1()
For rwindex = 3 To 300
With Worksheets("Quick_LookUp").Cells(rwindex, 3)
Cells(rwindex, 2).Font.ColorIndex = 1
Cells(rwindex, 2).Font.Size = 12
Select Case .Value
Case 0: Cells(rwindex, 2).Interior.ColorIndex = 2
Case 1: Cells(rwindex, 2).Interior.ColorIndex = 36
Case 2: Cells(rwindex, 2).Interior.ColorIndex = 40
Case 3: Cells(rwindex, 2).Interior.ColorIndex = 35
Case 4: Cells(rwindex, 2).Interior.ColorIndex = 38
Case 5: Cells(rwindex, 2).Interior.ColorIndex = 34
Case 6: Cells(rwindex, 2).Interior.ColorIndex = 17
Cells(rwindex, 2).Font.ColorIndex = 2
Case 7: Cells(rwindex, 2).Interior.ColorIndex = 39
Case 8: Cells(rwindex, 2).Interior.ColorIndex = 22
Case 9: Cells(rwindex, 2).Interior.ColorIndex = 12
Cells(rwindex, 2).Font.ColorIndex = 2
End Select
End With
Next rwindex
End Sub


If you want the file i'll send it to you


--
Maurice


------------------------------------------------------------------------
Maurice's Profile: http://www.excelforum.com/member.php...fo&userid=1948
View this thread: http://www.excelforum.com/showthread...hreadid=374973