View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason Morin Jason Morin is offline
external usenet poster
 
Posts: 63
Default Convert string to variable

I have several variables named RandRow1, RandRow2, etc. that have been
populated with values. How do I convert a concatenated string into an actual
variable? In this case it's RandRow & i where i = 1 to 10. Thanks.

Dim RandRow1 as Long
Dim RandRow2 as Long
etc.

With Sheets("writtentest")
For i = 1 To 10
.Cells(i, "A") = Sheets("words").Cells(RandRow & i, "A")
Next
End With