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

  • Thread starter Thread starter toreadore
  • Start date Start date
T

toreadore

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

Toreador
 
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
 

Ask a Question

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.

Ask a Question

Back
Top