I recorded the following macro:
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="VIN2", RefersToR1C1:="='SVCHistory'!R1C1:R1189C1"
I select a cell (A1) and then ShiftCtlDown to the end of that list (R1189C1 in the above example). Then I want to Name that Range. The issue is the ending cell will change each time I run the macro
How can I make the (R1189C1) in the above example a variable of the cell selected by the (Selection.End(xlDown)) command?
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="VIN2", RefersToR1C1:="='SVCHistory'!R1C1:R1189C1"
I select a cell (A1) and then ShiftCtlDown to the end of that list (R1189C1 in the above example). Then I want to Name that Range. The issue is the ending cell will change each time I run the macro
How can I make the (R1189C1) in the above example a variable of the cell selected by the (Selection.End(xlDown)) command?