bhsoundman
Board Regular
- Joined
- Jul 17, 2010
- Messages
- 56
- Office Version
- 365
- Platform
- MacOS
Hi All,
I'm trying to determine which range my active cell is in. I have a working method, however I'm trying to avoid having to name a 100 ranges & have 100 cases in VBA.
For example if the active cell is within columns A:E, then A1 should be selected when the macro runs. If it's within columns F:J, then F1 should be selected. It would follow the same pattern for 100 possible range options. Every range option would be the same number of columns each time. & the cell that gets selected will always be in the same relative location (A1, F1 etc etc)
Do I just have to bite the bullet & start naming ranges & cases?
Thanks in advance for you expertise!
I'm trying to determine which range my active cell is in. I have a working method, however I'm trying to avoid having to name a 100 ranges & have 100 cases in VBA.
For example if the active cell is within columns A:E, then A1 should be selected when the macro runs. If it's within columns F:J, then F1 should be selected. It would follow the same pattern for 100 possible range options. Every range option would be the same number of columns each time. & the cell that gets selected will always be in the same relative location (A1, F1 etc etc)
Do I just have to bite the bullet & start naming ranges & cases?
Thanks in advance for you expertise!