I would like to use Excel recorder to name a range in VBA.
The table may have different
number of rows every day in a file. It can start at Row 13 one day, maybe starts as Row 17 the other day.
column starts with "Age Bucket" in Column A.
Using recorder, it has to define a fixed address which may
be true for one day, but wrong for next day.
In this case, I was forced to set the range and name it as
Is it possible to select the data in table after
column header "Age Bucket" and name it as "Data" in VBA?
Thanks for help.
Cells.Find(What:="Age Bucket", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, MatchByte:=False, SearchFormat:=False).Activate
ActiveWorkbook.Names.Add Name:="Data", RefersToR1C1:= _
ActiveWorkbook.Names("Data").Comment = ""