Hi everyone.
I have data in 2 rows and 40 columns in Excel.
I need to walk through the data performing tasks, but I'm not sure how to write a loop that steps through columns since they are named with letters instead of numbers.
Is there a 'NextColumn' keyword or anything like that?
Currently, the only way I can think of to do it is to use a giant 40 member select case statement ie
for i = 1 to 40
Select case i
Case 1
column = "A"
Case 2
column = "B"
...
Case 40
column = "AN"
end select
cell = column & "1"
Just seems like there should be a better way.
Thanks
PB
I have data in 2 rows and 40 columns in Excel.
I need to walk through the data performing tasks, but I'm not sure how to write a loop that steps through columns since they are named with letters instead of numbers.
Is there a 'NextColumn' keyword or anything like that?
Currently, the only way I can think of to do it is to use a giant 40 member select case statement ie
for i = 1 to 40
Select case i
Case 1
column = "A"
Case 2
column = "B"
...
Case 40
column = "AN"
end select
cell = column & "1"
Just seems like there should be a better way.
Thanks
PB