Hi AB33,
Thanks again for your response. I think I got it about the code tags - see below.
In essence what I am trying to accomplish is the following:
1) I have a set of detailed workbooks which each have a table called TableFcstDetails;
2) I have a central workbook which has a table called TableFcstCentral;
3) I want to append the data from each table in a detailed workbook to the table in the central workbook.
Any help solving this will be much appreciated.
Regards,
Purpose
'Empty table with processing status
Sheets("Processing Status").Range("TablePrcssStts").Delete
Application.ScreenUpdating = False
Dim TableProcess As Range
Dim row As Range
Newrow = 0
Set TableProcess = Sheets("Central Master Data").Range("TableForecasters")
'For every row in table "TableForecasters"
For Each row In [TableForecasters].Rows
'If Forecast Details Workbook Status = "Submitted" and Forecast Details Workbook Process Status = "NOT Procssed"
'Then Append table "TableFcstDetails" from Detail workbook to table "TableFcstCentral" in Central workbook - values only
If TmpDtlsStts = "Submitted" And TmpDtlsPrcssStts = "NOT Processed" Then
Dim sWb As Workbook
Dim dWb As Workbook
Dim sWs As Worksheet
Dim dWs As Worksheet
Dim sLo As ListObject
Dim dLo As ListObject
Dim sRng, dRng As Range
Set dWb = ThisWorkbook
Set dWs = dWb.Worksheets("Central")
Set dLo = dWs.ListObjects("TableFcstCentral")
'This is where I determine the target range
Set dRng = dLo.HeaderRowRange.Columns(1).Offset(dLo.ListRows.Count + 1, 0)
'Open Detail workbook
Workbooks.Open Filename:=TmpPathFile
Set sWb = Workbooks(TmpFile)
Set sWs = sWb.Worksheets("Details")
Set sLo = sWs.ListObjects("TableFcstDetails")
Set sRng = sLo.DataBodyRange
'do the actual copy of the data
sRng.Copy
dRng.PasteSpecial Paste:=xlPasteValues
'Close Detail workbook
Workbooks(TmpFile).Save
Workbooks(TmpFile).Close False
Application.CutCopyMode = False
End If
Next
Application.ScreenUpdating = True
MsgBox ("Applicable data has been retrieved.")
Bookmarks