Macro Help [Solved/Closed]

futurepsych92 10 Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Feb 19, 2016 at 11:31 AM - Latest reply: futurepsych92 10 Posts Monday January 4, 2016Registration date February 19, 2016 Last seen
- 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
See more 

2 replies

0
Helpful
1
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)
futurepsych92 10 Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Feb 19, 2016 at 09:41 PM
I will try that--thanks!