Thread: Formula error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Shu of AZ Shu of AZ is offline
external usenet poster
 
Posts: 130
Default Formula error

Could you look at the below formula for Select Case and tell me what is
incorrect. It does not perform correctly on the worksheet.

Const SaddleBlanket = "O5:O43"
Dim SaddleBlanket As String

Worksheets(R12).Select
Range(SaddleBlanket).Select
Selection.Interior

Select Case SaddleBlanket
Case Is = 1
Selection.ColorIndex = 3
Case Is = 2
Selection.ColorIndex = 2
Case Is = 3
Selection.ColorIndex = 41
Case Is = 4
Selection.ColorIndex = 6
Case Is = 5
Selection.ColorIndex = 50
Case Is = 6
Selection.ColorIndex = 1
Case Is = 7
Selection.ColorIndex = 46
Case Is = 8
Selection.ColorIndex = 7
Case Is = 9
Selection.ColorIndex = 42
Case Is = 10
Selection.ColorIndex = 13
Case Is = 11
Selection.ColorIndex = 48
Case Is = 12
Selection.ColorIndex = 4
End Select