View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default A Boolean expression




Is there a boolean expression that will do this?

Cells yellow with an A or not.

Thanks
Howard

Sub CellColLetter()
'/ Ctrl + q
With Selection
If Selection.Interior.ColorIndex < 6 Then
Selection.Interior.ColorIndex = 6
Selection = "A"
Else
Selection.Interior.ColorIndex = xlNone
Selection.ClearContents
End If
End With
End Sub