View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Roman[_4_] Roman[_4_] is offline
external usenet poster
 
Posts: 93
Default macro to colour empty cells (cells not recognized as empty)

Hi Gerben,
the thing is that empty cell value is not " " but "".

Sub recol()
For Each ccell In Selection
If ccell.Value = "" Then GoSub colorit
If ccell.Value = 1 Then GoSub colorit
Next
Exit Sub
colorit:
ccell.Interior.ColorIndex = 20
Return
End Sub