Hi
you may try the following to select all non blank cells in column A
Sub foo2()
Dim rng As Range
Dim cell As Range
Dim target_rng As Range
Set rng = Range("A:A")
For Each cell In rng
If cell.Value <> "" Then
If target_rng Is Nothing Then
Set target_rng = cell
Else
Set target_rng = Union(target_rng, cell)
End If
End If
Next
target_rng.Select
End Sub
Sub findAll1()
Dim Str As String, c As Range
For Each c In Range("D218")
If c.Value <> "" Then Str = Str & "," & c.Address
Next c
Range(Mid(Str, 2, Len(Str))).Select
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.