Felix_Dragonhammer
Board Regular
- Joined
- Apr 7, 2015
- Messages
- 117
So I have problem with referencing cells in VBA to make my code more dynamic.
I have a cell, B3, that contains a number (currently 23) that represents the current week. Everytime I run my code, the B3 gets one added to it.
I have a section of code I'd like to modify to reflect the change in week:
I'd like the cells to reference B3 so that everytime B3 updates, the column increases by 1. Also, the column number is always 5 more than the value in B3. So basically, when I run the code, I want the Range to hit all the rows mentioned in the code above in Column 29, and next week I want it to select all the rows in Column 30.
Thank you!
I have a cell, B3, that contains a number (currently 23) that represents the current week. Everytime I run my code, the B3 gets one added to it.
I have a section of code I'd like to modify to reflect the change in week:
Code:
Range("AC11,AC11,AC17,AC23,AC29,AC35,AC41,AC47,AC53,AC59,AC65").Select
I'd like the cells to reference B3 so that everytime B3 updates, the column increases by 1. Also, the column number is always 5 more than the value in B3. So basically, when I run the code, I want the Range to hit all the rows mentioned in the code above in Column 29, and next week I want it to select all the rows in Column 30.
Thank you!