Hello,
I am attempting to create a VBA routine that defines a data range (LookupDate). The first cell in the range remains constant (P33); however, the last row changes. I have a cell (S17) that displays the last row where the range should end. I believe I am looking for a way to change the row marker (R87) in the following line of code to be based on the value in cell S17
ActiveWorkbook.Names.Add Name:="LookupDate", RefersToR1C1:="=Amortize!R33C16:R87C16"
Something like
ActiveWorkbook.Names.Add Name:="LookupDate", RefersToR1C1:="=Amortize!R33C16:RS17C16"
Or
ActiveWorkbook.Names.Add Name:="LookupDate", RefersToR1C1:="=Amortize!R33C16:R�S17�C16"
Or
ActiveWorkbook.Names.Add Name:="LookupDate", RefersToR1C1:="=Amortize!R33C16:R&�S17�C16"
Or
ActiveWorkbook.Names.Add Name:="LookupDate", RefersToR1C1:="=Amortize!R33C16:R" & S17 & "C16"
Or
?????
Here is my current (erroneous) macro:
Any suggestions would be appreciated. Thanks![]()
Please Login or Register to view this content.
Thanks for viewing,
Steve K.
Bookmarks