Hello, I have a worksheet that imports data into a sheet on my main file. I have the following code to create the named range and it works fine. However the "Accounts by Contract Rep file that I import may expand or decrease in the number of rows needed so I would like to be able to make the last row (regardless of what row #) that contains data the end of the range. How can I do this? Thanks.
![]()
Range("A6:A" & Cells(Rows.Count, "C").End(xlUp).Row).Select ActiveWorkbook.Names.Add Name:="assignedreps", RefersToR1C1:= _ "='Accounts by Contract Rep'!R6C1:R1100C1"
Bookmarks