Report

Macro Help [Solved]

Ask a question futurepsych92 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Latest answer on Feb 19, 2016 09:41PM
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 
Helpful
+0
moins plus
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 10Posts Monday January 4, 2016Registration date February 19, 2016 Last seen - Feb 19, 2016 09:41PM
I will try that--thanks!
Reply
Add comment

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.

Not a member yet?

sign-up, it takes less than a minute and it's free!