Hi,
This is probably a simple question, but I can't seem to get it to work. How can I resize a named range to be one row less that it was previously defined as?
I have a name "Trav" in a sheet that and this name is defined as ='Trav Data'!$B$4:$Q$6, a macro inserts rows from 5 to xxx, which changes the name to be ='Trav Data'!$B$4:$Q$XXX+1 (where xxx+1 is the last row, which is blank). Macros then refresh a pivot table from this data, but the pivot table has one blank row (the xxx+1 row), so I would like to resize the named range once the first macro runs.
I have tried: ActiveSheet.Range("Trav") = Range("Trav").Offset(-1, 0), but this replaces the range, not the name.
Thanks,
Chris
This is probably a simple question, but I can't seem to get it to work. How can I resize a named range to be one row less that it was previously defined as?
I have a name "Trav" in a sheet that and this name is defined as ='Trav Data'!$B$4:$Q$6, a macro inserts rows from 5 to xxx, which changes the name to be ='Trav Data'!$B$4:$Q$XXX+1 (where xxx+1 is the last row, which is blank). Macros then refresh a pivot table from this data, but the pivot table has one blank row (the xxx+1 row), so I would like to resize the named range once the first macro runs.
I have tried: ActiveSheet.Range("Trav") = Range("Trav").Offset(-1, 0), but this replaces the range, not the name.
Thanks,
Chris