I have three separate documents that are updated on constant basis by 3 different people.
Those three documents are linked to a 4th document and will update every hour.
I need to summarize this information automatically for dashboard purposes.
I can't use a pivot table because most of the data is text so a pivot table from multiple ranges does not work.
I wrote a macro to consolidate the data and it works. I can use that data to pivot from there. But I can't repeat that macro.
I need a way to update that consolidated information. as the the three sheets are updated.
Macro below: sample workbook attached.
Thanks for your help!
Sub Combine()
Const NHR = 1 'Number of header rows to not copy from each MWS
Dim MWS As Worksheet 'Worksheet to be merged (appended)
Dim AWS As Worksheet 'Worksheet to which the data are transferred
Dim FAR As Long 'First available row on AWS
Dim LR As Long 'Last row on the MWS sheets
Set AWS = ActiveSheet
For Each MWS In ActiveWindow.SelectedSheets
If Not MWS Is AWS Then
FAR = AWS.UsedRange.Cells(AWS.UsedRange.Cells.Count).Row + 1
LR = MWS.UsedRange.Cells(MWS.UsedRange.Cells.Count).Row
MWS.Range(MWS.Rows(NHR + 1), MWS.Rows(LR)).Copy AWS.Rows(FAR)
End If
Next MWS
End Sub
Moderators note: code tags added for you - this time
Bookmarks