I'm sure there's something simple I'm missing . . . I got the formula for adding a named range using the macro editor, and edited it to account for the last row which will vary on different reports. This syntax isn't correct though for the cell address which refers to the Detail sheet. I've tried numerous variations to no avail. What is the correct syntax, or is there a different way to name a range without using the "RefersToR1C1"?
Dim lRow As Long
Range("T65000").Select
lRow = Selection.End(xlUp).Select
ActiveWorkbook.Names.Add Name:="Paper", RefersToR1C1:= _
"=Detail!R2C20:" & lRow & "C20"
Thanks very much!
Dim lRow As Long
Range("T65000").Select
lRow = Selection.End(xlUp).Select
ActiveWorkbook.Names.Add Name:="Paper", RefersToR1C1:= _
"=Detail!R2C20:" & lRow & "C20"
Thanks very much!