Lefemmenikita
Board Regular
- Joined
- Jan 28, 2014
- Messages
- 59
- Office Version
- 2013
- Platform
- Windows
Hi
I have recorded a macro to see the code to do this though am stuck.
I am trying to create a named range in a worksheet, for a data range that changes monthly.
I want the name of the named range to be based on the name of the worksheet the data resides in.
For example, if the worksheet is named 'sheet1', I want the named range (cells A1; last used row & column) to be called 'sheet1'
Is there a way to do that via vba?
The problem is at the moment, the only way that I am able to 'extract' the name of the worksheet is by double clicking the tab name and copying & pasting it into the named range field.
I want to automate it so that the named range automatically picks up the worksheet/tab name
Thanks
I have recorded a macro to see the code to do this though am stuck.
I am trying to create a named range in a worksheet, for a data range that changes monthly.
I want the name of the named range to be based on the name of the worksheet the data resides in.
For example, if the worksheet is named 'sheet1', I want the named range (cells A1; last used row & column) to be called 'sheet1'
Is there a way to do that via vba?
The problem is at the moment, the only way that I am able to 'extract' the name of the worksheet is by double clicking the tab name and copying & pasting it into the named range field.
I want to automate it so that the named range automatically picks up the worksheet/tab name
Thanks