Hi, I have 5 variables
pos1 : 10
pos2 : 19
pos3 : 25
pos4 : 36
pos5 : 42
and i have a loop from 1 to 5 in which i have to change the variable name inside as so to access the content of the variable:
for i=1 to 5
x= cells("pos" & i, 1).value
and so on
so when i combine the name "pos" with a variable part "i", all i get is the name only "pos1". how can i tell vba that the result is a variable and it should use the content and not the name only??
I hope it's clear what i'm trying to explain...
thanks in advance
pos1 : 10
pos2 : 19
pos3 : 25
pos4 : 36
pos5 : 42
and i have a loop from 1 to 5 in which i have to change the variable name inside as so to access the content of the variable:
for i=1 to 5
x= cells("pos" & i, 1).value
and so on
so when i combine the name "pos" with a variable part "i", all i get is the name only "pos1". how can i tell vba that the result is a variable and it should use the content and not the name only??
I hope it's clear what i'm trying to explain...

thanks in advance