Variable length named ranges
I assume that nRows is an integer or long variable...
ThisWorkbook.Names.Add Name:="dAge", RefersTo:="=RawData!$H$2:$H$" & nRows,
Visible:=True
--
HTH...
Jim Thomlinson
"adimar" wrote:
I need a way to specify a variable for the last row in a named range.
A static definition looks like this:
ThisWorkbook.Names.Add Name:="dAge", RefersTo:="=RawData!$H$2:$H$100",
Visible:=True
I would like to replace 100 with nRows and need help with the syntax.
Thank you.
|