Rebecca has attended:
Excel Advanced course
Refer to data that has been named - define
I have a large file that has been segmented into areas that are given specific names. (In this case each section is divided into months.)
I have defined the names by going into Insert, Name, Define. I am now writing a code that refers to column 5 in each segmented month. I am trying to refer to the range by the Name i have inserted and then by offseting to column 5, however I cannot seem to write the code correctly
Can you help
Many thanks
Becky
RE: Refer to data that has been named - define
Hi Rebecca
Thank you for your question
There are a number of approaches here, depending on what you want to achieve although in general they all use the cells property of the range object
1. To select the column header cell
Range("Sales").Cells(1, 5).Select
The above code selects the cell on the first row and fifth column of the range