Code:
Hi Team,
I want to consolidate DailyCount data
(i.e Daily Dataworkbooks specific sheetsData into masterworkbooks specific sheets)
There are multiple sheets in DailyDataworkbook and Masterworkbook I have reduced few of them.
Below are my attempted code not accurate. plz assist.
Sub Consolidation_Data()
Dim DataLr As Long
Dim wbk As ThisWorkbook
Dim Datawbk As Workbook
Dim Masterwbk As Workbook
Set wbk = ThisWorkbook
Set Datawbk = Workbooks.Open(wbk.Worksheets("Sheet1").Range("D5").Value, ReadOnly:=True)
Set Masterwbk = Workbooks.Open(wbk.Worksheets("Sheet1").Range("D7").Value, ReadOnly:=True)
Dim Dataws As Worksheet
Dim shtn As Worksheet
For Each Dataws In Datawbk.Worksheets
Select Case Dataws.Name
Case "OutgoingCall", "IncomingCall", "CallReview"
DataLr = Dataws.Range("a1").CurrentRegion.Rows.Count
Dataws.Activate
If DataLr > 1 Then
Dataws.Range("a1").CurrentRegion.Offset(1).Copy
For Each shtn In Array("Outgoing", "Incoming", "Review")
Masterwbk.Sheets(shtn).Cells(Rows.Count, 1).End(xlUp).Offset(1).PasteSpecial:= xlPasteValues
Next
Else
Exit For
End Select
Next
End Sub
Thanks in Advance !
Regards,
Mallesh