Return cell adress for next non-blank cell in a range

T

toreadore

Please help: How can i programmatically lookup the cell adress for nex
non-blank cell in a range?

Toreador
 
G

Gary''s Student

This UDF returns the cell address of the first non-blank cell in a range:

Function nonblank(R As Range) As String
Dim rr As Range
nonblank = ""
For Each rr In R
If IsEmpty(rr.Value) Then
Else
nonblank = rr.Address
Exit Function
End If
Next
End Function
 
Top