Good afternoon,
I'm trying to "export" data from a static ws "order" (Sheet2) to a selected (active) worksheet. This will happen with 15 different (random) cells. I got this far but the copying isn't happening from the correct sheet or going to the active sheet. The data in "G5" on "order" should go to the first unused row on the active sheet. What I got was backwards. (Once I get the first one to work I can finish the code for the other 14 cells. I appreciate getting pointed in the right direction. I tried to tweak something that was going the other way - probably all wrong.)
Private Sub Export_Click()
Dim LR As Long
LR = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
With Sheet2
'G5 to col 1, G6 to col 2, G7 to col 3, I7 to col 4, K7 to col 5,D2 to col 7
Range("G5").Value = Sheets("Order").Cells(LR, 1).Value
Range("G6").Value = Sheets("Order").Cells(LR,2).Value
etc....
End With
End Sub
Bookmarks