Macro to select cells within a range in which the cell color is none
adapted from bob phillips
Sub GetUnShadedCells()
Dim cell As Range
Dim rng As Range
For Each cell In Range("A2:A27")
If cell.Interior.ColorIndex = xlNone Then
If rng Is Nothing Then
Set rng = cell
Else
Set rng = Union(rng, cell)
End If
End If
Next cell
If Not rng Is Nothing Then
rng.Select
End If
End Sub
--
Gary
"PCLIVE" wrote in message
...
Within a range, say A2:A27, I want to select only the cells whose shading
is none. How can I do this? I think I've seen similar postings in the
past, but I was unable to find them.
Thanks,
Paul
|