I have multiple sheets that pull data from ODBC, and it gets updated on a regular basis. Each of these sheet track different thing. For instance, "Check" tab tracks all the check transactions, "CreditCardCharge" tab tracks all the CC transactions...etc. I have created identical labels for all the sheets. e.g. Date, Ref Num, Account Name, Memo, Amount...etc I need all these sheet to be mapped to one master data dump sheet whenever I update the file.
This is the work flow:
- Clear all data in "LP_DataDump" tab starting from A2
- Copy "Check" tab data from A3 to Col J end row
- Paste copied data to "LP_DataDump" starting from A2
- Copy "CreditCardCharge" tab data from A3 to Col J end row
- Paste copied data to "LP_DataDump" starting from last empty row
I started with this below, but it's not working.
Can anyone advice?
Sub CopyCheckValue()
Dim Check As Worksheet
Dim LastRow As Long
Set Check = Sheets("Check")
LastRow = Check.Cells(Check.Rows.Count, "A").End(x1Up).Row
Check.Range("A3:J" & LastRow).Copy _
Destination:=Worksheets("LP_DataDump").Range("A2")
End Sub