Probalby a very basic question, but I am still new to VBA. How do I reference a column by its letter, rather than its number?
At the moment I have various column numerical references in my code, e.g.
but if for whatever reason columns get deleted, I have to go through all the code and change the numberical references, which is a pain. What I would like is to have a way of referencing the column in the code, so that if a column is deleted or inserted, the column references are automatically updated across the code in a similar way to standard formula. Is this possible to do?
Something along the lines of:
but in a way that if one column say to the left of AN were deleted, all code references would automatically resulting, in this case to:
Many thanks
At the moment I have various column numerical references in my code, e.g.
Code:
For i = 40 To 51
Something along the lines of:
Code:
For i = column AN To column AY
Code:
For i = coulmn AM To column AX