I am using cpearsons code from http://www.cpearson.com/excel/colors.htm
It there a way of only running this code from a certain worksheet
something like If ActiveSheet.Name <> "Subassy" Then End
I only need this to run on this worksheet
It there a way of only running this code from a certain worksheet
something like If ActiveSheet.Name <> "Subassy" Then End
I only need this to run on this worksheet
Code:
Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange(1, 1).Font.ColorIndex
Else
CellColorIndex = InRange(1, 1).Interior.ColorIndex
End If
End Function