A few variations, especially if you like one-liners:
Sub HighlightAllNumbers()
On Error Resume Next
ActiveSheet.Cells.SpecialCells(xlCellTypeConstants
xlNumbers).Interior.ColorIndex = 6
End Sub
Sub HighlightAllText()
On Error Resume Next
ActiveSheet.Cells.SpecialCells(xlCellTypeConstants
xlTextValues).Interior.ColorIndex = 7
End Sub
Sub UndoAllHighlights()
On Error Resume Next
ActiveSheet.Cells.SpecialCells(xlCellTypeConstants ).Interior.ColorInde
= 0
End Sub
Sub ShowColorPalette()
For x = 1 To 56
With ActiveCell 'starts at current cell
.Offset(0, 0) = x
.Offset(0, 1).Interior.ColorIndex = x
.Offset(1, 0).Select
End With
Next
End Sub
Regards,
billy
--
Message posted from
http://www.ExcelForum.com