Hi. I'm working through step-by-step creating a named range macro that will, eventually I hope, result in a range named the same as the worksheet name. My range starts at A2 and "should end" in column J at last row 416. The result I'm getting is =Nov_02_2016!$A$2:$J$2416. Clearing/deleting the rows from 417 - 2416 and rerunning the VB returns the same results. Obviously I'm not doing something correctly . . . .
Sub birrange3()
'm_birrange3
Dim lastRow As Long
lastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Application.Volatile True
Range("A2:J2" & lastRow).Select
ActiveWorkbook.Names.Add Name:="birrange3", RefersTo:=Selection
End Sub
After that it's figure out how to use something like ActiveSheet.Name = Format(Now(), "mm-dd-yy") with a prefix to name the range . . .
As always from the "Not a real coder . . ."
Just the one eyed person in the land of the blind.
THANKS!!!
Sub birrange3()
'm_birrange3
Dim lastRow As Long
lastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Application.Volatile True
Range("A2:J2" & lastRow).Select
ActiveWorkbook.Names.Add Name:="birrange3", RefersTo:=Selection
End Sub
After that it's figure out how to use something like ActiveSheet.Name = Format(Now(), "mm-dd-yy") with a prefix to name the range . . .
As always from the "Not a real coder . . ."
Just the one eyed person in the land of the blind.
THANKS!!!