Function RRel(colmn, Optional offst, Optional rng)
If offst Is Nothing Then Set offst = -1
If rng Is Nothing Then Set rng = Application.Caller
RRel = Intersect(colmn, rng.offset(offst, 0).EntireRow)
End Function
When I try to use this as an excel formula, e.g., =RRel(P:P)
I get an error:
Compile error:
object required
And the debug point is on the function header
I don't understand why you need a UDF to do this: why not just do it with Excel formulas? Anyway if you insist you can try this: