Hey guys I have a question. Here is the rundown of what I am trying to do.
1. I want to copy a specific cell from Sheet1 let's say A1
2. Then I want to paste the 'value' not formula of that cell on Sheet2 starting at A1.
3. Next I want to refresh the data values on Sheet1 (it does calculations with rand)
4. After the refresh I want to again copy the 'value' from A1 on Sheet1 and paste it in A2 on Sheet2.
5. Repeat refreshing Sheet1 copying and pasting into A3, A4, A5 ... of Sheet2
I want to repeat this as many times as possible.
From browsing I have figured out I can use this to search a column for the next available spot.
Dim LastRow As Integer
LastRow = Worksheets("Sheet2").Range("A65536").End(xlUp).Row (Thank you Luke M)
I don't know if it is possible to fill up Column A and move over to B or not, but I am fine with 65k values each time I run the macro. I could do the transfers manually.
My problem is I don't know how to use the copy or cells command correctly.
This was my attempt
Worksheets("Sheet1").Cells("1","A").Select
Selection.Copy Worksheets("Sheet2").Cells(LastRow + 1, "A")
Even if that somehow worked, I am not sure if the data on Sheet1 needs some type of command to refresh or not.
Any Help would be greatly appreciated, thanks.
1. I want to copy a specific cell from Sheet1 let's say A1
2. Then I want to paste the 'value' not formula of that cell on Sheet2 starting at A1.
3. Next I want to refresh the data values on Sheet1 (it does calculations with rand)
4. After the refresh I want to again copy the 'value' from A1 on Sheet1 and paste it in A2 on Sheet2.
5. Repeat refreshing Sheet1 copying and pasting into A3, A4, A5 ... of Sheet2
I want to repeat this as many times as possible.
From browsing I have figured out I can use this to search a column for the next available spot.
Dim LastRow As Integer
LastRow = Worksheets("Sheet2").Range("A65536").End(xlUp).Row (Thank you Luke M)
I don't know if it is possible to fill up Column A and move over to B or not, but I am fine with 65k values each time I run the macro. I could do the transfers manually.
My problem is I don't know how to use the copy or cells command correctly.
This was my attempt
Worksheets("Sheet1").Cells("1","A").Select
Selection.Copy Worksheets("Sheet2").Cells(LastRow + 1, "A")
Even if that somehow worked, I am not sure if the data on Sheet1 needs some type of command to refresh or not.
Any Help would be greatly appreciated, thanks.