Macro Help

Solved/Closed
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016 - Feb 19, 2016 at 11:31 AM
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016 - Feb 19, 2016 at 09:41 PM
Greetings fellow users!

I am in need of some assistance:


Recently, I have created a macro in which I need to copy 100+ variables from one sheet to another. Due to various constraints, I have found it easiest to paste them individually (see example below). I was just wondering if there is a limit on how many variables Excel can hold in memory. Thank you so much in advance.

Sheets(“Sheet1”).activate
Var1 = cells(1,3)
Var2 = cells (1, 6)
Var3 = cells(1,8)
Sheets(“Sheet2”).activate
Cells(1,1) = Var1
Cells(1,2) = Var2
Cells(1,3) = Var3

1 response

Rather than using variables why not consider this:

Sheets("Sheet2").Cells(1, 1) = Sheets("Sheet1").Cells(1, 3)
Sheets("Sheet2").Cells(1, 2) = Sheets("Sheet1").Cells(1, 6)
Sheets("Sheet2").Cells(1, 3) = Sheets("Sheet1").Cells(1, 8)
0
futurepsych92 Posts 8 Registration date Monday January 4, 2016 Status Member Last seen February 19, 2016
Feb 19, 2016 at 09:41 PM
I will try that--thanks!
0