D
deano
Cheers all,
I wrote a UFD to return address of last cell of a column of data. The
function takes a cell reference in the column of interest as its
argument.
For example The data is in a range on worksheet1 B26, lastcellref(b2)
should return $b$6
the Function code is:
Function lastcellref(thiscolumn As Variant)
Dim lastcell As Variant
Set lastcell = Cells(1001, thiscolumn.Column).End(xlUp)
Set lastcellref = lastcell.AddressLocal(RowAbsolute:=True,
columnabsolute:=True)
End Function
when I run this function, I get Run time error 424, object required.
what am I doing wrong?
I wrote a UFD to return address of last cell of a column of data. The
function takes a cell reference in the column of interest as its
argument.
For example The data is in a range on worksheet1 B26, lastcellref(b2)
should return $b$6
the Function code is:
Function lastcellref(thiscolumn As Variant)
Dim lastcell As Variant
Set lastcell = Cells(1001, thiscolumn.Column).End(xlUp)
Set lastcellref = lastcell.AddressLocal(RowAbsolute:=True,
columnabsolute:=True)
End Function
when I run this function, I get Run time error 424, object required.
what am I doing wrong?