UDF to find end of range
Thanks for the suggestion. Using this code I get a #VALUE! error:
Function EndAddress()
Range("A1").End(xlDown).Address
End Function
The range in this case is A1:A5 and there are no blanks in the row.
This code is entered in a module.
Thoughts?
On Nov 5, 2:56 pm, Myrna Larson
wrote:
If there are no embedded blanks between A1 and the last filled cell:
Range("A1").End(xlDown).Address
If there are, but there's no data below the specified range,
Cells(Rows.Count, 1).End(xlUp).Address
On Mon, 05 Nov 2007 11:30:12 -0800, Dave F wrote:
Does anyone have code for a UDF that will return the ending cell of a
range.
I'm envisioning something like =EndAddress(A1) would return, say $A$10
if the range A1:A10 were populated.
Anyone ever create a UDF along these lines?
Thanks,
Dave- Hide quoted text -
- Show quoted text -
|