Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1:A10") If Intersect(Target, r) Is Nothing Then Exit Sub End If vals = Array("C", "D", "G", "H", "K", "L", "O", "S", "C", "X") 'your values nums = Array(8, 9, 6, 3, 7, 4, 20, 10, 8, 15) 'edit colorindex numbers For Each rr In r icolor = 0 For i = LBound(vals) To UBound(vals) If UCase(rr.Value) = vals(i) Then icolor = nums(i) End If Next If icolor 0 Then rr.Interior.ColorIndex = icolor End If Next End Sub Gord Dibben MS Excel MVP On Sat, 12 Dec 2009 03:51:01 -0800, Cheng Joo wrote: I have a worksheet that I need to colour code the cells according to their values and I need a total of 11 colours. Conditional formatting only has up to 3 conditions and so I cannot use that method. Is there any other way that I can format my cells to automatically colour code? Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using 2 cell CF conditions from different cells together | Excel Worksheet Functions | |||
referencing cells based on conditions in other cells | Excel Discussion (Misc queries) | |||
trying to set conditions for a range of cells | Excel Worksheet Functions | |||
shade cells based on conditions - i have more than 3 conditions | Excel Worksheet Functions | |||
Averaging Cells Based On Conditions in Neighboring Cells | Excel Discussion (Misc queries) |