View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Loop with Variable name?

Please don't multi post. You have lots of replies in general...
--
HTH...

Jim Thomlinson


"Mike" wrote:

Hi. I have 12 variables that are names PN1, PN2, .... PN12

I would like to have a "For - Next" loop that would execute for i = 1 to 12
where "i" would change in the variable name. I cannot figure out how to
refer to the variable:

For i = 1 to 12

x = PNi + 5

Next i

Any help would be appreciated ...

Thanks,
Mike.


(Note I posted this previously in error to the "General" section)