Dear all,
I want to use Chr function to select multiple columns as the coding contains variable. However, if the column is double-lettered column, the coding would have error.
For example:
temp = 22
Columns(Chr(64 + temp + 3) & ":" & Chr(64 + temp + 4)).Select
Column Y and Z will be selected.
temp = 23
Columns(Chr(64 + temp + 3) & ":" & Chr(64 + temp + 4)).Select
Supposed Column Z and AA will be selected. However as Chr(91) is not AA so the coding would have error.
How can I prevent this error? Or is there any other coding instead of using Chr function to get the same result? Thanks.
Jack
Bookmarks