I have been at this now for days now trying everything i can find and adapting it.
I want to copy data from one sheet to another at exactly one row beneath the last used row in the store sheet. I have had mixed results but none that i can find does exactly what i need and looking for some helpful pointers.
ws1 one is temp storage and ws2 is the store, when i click submit i want the used range from ws1 to be added to the row under the last used row of sheet2. This will be a continuous thing with more entries.
This is what i have so far and really hope someone here can help?
I want to copy data from one sheet to another at exactly one row beneath the last used row in the store sheet. I have had mixed results but none that i can find does exactly what i need and looking for some helpful pointers.
ws1 one is temp storage and ws2 is the store, when i click submit i want the used range from ws1 to be added to the row under the last used row of sheet2. This will be a continuous thing with more entries.
This is what i have so far and really hope someone here can help?
Code:
Sub moveDataToStore()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim LastRow
Dim myRange As Range
Set ws1 = Sheets("Temp")
Set ws2 = Sheets("Store")
myRange = ws1.UsedRange.CurrentRegion
With myRange
If Sheets("Store").Range("A1").Value = "" Then
.Copy Destination:=ws2.Cells(1, 1)
Else
LastRow = ws2.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
.Copy Destination:=ws2.Cells(LastRow + 1).Row
End If
End With
ws1.Range("A:G") = ""