Function to find the first cell that is not zero
Many thanks. I'll try it after I get home agian.
Cheers
"Gary''s Student" wrote in message
...
Function nonzero(r As Range) As String
nonzero = ""
For Each rr In r
If rr.Value < 0 Then
nonzero = rr.Address
Exit Function
End If
Next
End Function
so if in row 17, F17 contains the first non-zero value then:
=nonzero(17:17)
will return
$F$17
--
Gary''s Student - gsnu200727
"Mark" wrote:
Hi
I want to find the first cell that is not zero "0" across a row. I am
also
trying a VBA solution, but is there perchance a function that will do
this?
Mark
|