XL Pro
Board Regular
- Joined
- Apr 17, 2002
- Messages
- 249
- Office Version
- 365
- Platform
- Windows
What's the easiest what to determine the position of a range within another range via VBA?
In my case, I want to know what column (not the column number) a range falls within another range?
For example:
Range("C1") in Range("C1:G1")
Range("N1") in Range("L1:O1")
I would like to know that C1 is in the first column of C1:G1, N1 would be in the 3rd column of L1:O1.
In my case, I want to know what column (not the column number) a range falls within another range?
For example:
Range("C1") in Range("C1:G1")
Range("N1") in Range("L1:O1")
I would like to know that C1 is in the first column of C1:G1, N1 would be in the 3rd column of L1:O1.
Last edited: