find and select all cells with a alphabetic character
Try this
Sub buildrange()
Dim rng As Range
Dim cell As Range
Set rng = Nothing
For Each cell In ActiveSheet.UsedRange
If Not (IsNumeric(cell.Value)) Then 'Changed for previous post
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
--
HTH...
Jim Thomlinson
"Giz" wrote:
I am trying to create a macro that finds, on a worksheet, all cells with an
alphabetic character (i.e. "a" or "b" or "c", etc.), and then selects them.
ANy ideas??
|