Dear All,
I daily get a system generated report in excel file named 'Report_Data.xls' which contains customer/client wise details of each of the client in a separate worksheet with name of customer/client
E.g. File Name : Report_Data.xls -->> this workbook has 250+ sheets, i.e. 1 each for the customer/client.
~Link to sample Report_Data file [~warning:-will immediately download as excel file]
What I could do for the time being is select the all the data from the customers/clients sheets and copy
What I want to achieve is this : ~Link to End Goal - Master_Data [~warning:-will immediately download as excel file]
Question is -
1. How to copy the selection
3. Create new file called Master_Data
2. How to paste the selection in new file [i.e. Master_Data workbook --> into single 'Client_Master' worksheet] one after the other vertically starting from column C.
3. Create additional helper columns A and B in new file [i.e. Client_Master worksheet] created with values from Report_Data --> individual sheet's A2 and B2 for each of the customer/client sheets.
Note : - Cell values at A2 and B2 in each of the individual customer/client wise sheets in Report_Data will always have name and date respectively.
Short Summary
Input>>Report_Data ----> is System generated report has 250+ worksheets, i.e. 1 each for the client
Output>>Master_Data ----> end goal is create this file/workbook with single worksheet named 'Client_Master' having all the data of 250+ clients one after the other with additional helper column A and B, the values of which will be taken from each of A2 and B2 of individual sheets in Report_Data workbook.
I daily get a system generated report in excel file named 'Report_Data.xls' which contains customer/client wise details of each of the client in a separate worksheet with name of customer/client
E.g. File Name : Report_Data.xls -->> this workbook has 250+ sheets, i.e. 1 each for the customer/client.
~Link to sample Report_Data file [~warning:-will immediately download as excel file]
What I could do for the time being is select the all the data from the customers/clients sheets and copy
VBA Code:
Sub CopyData()
TotalSheets = Worksheets.Count
For i = 1 To TotalSheets
If Worksheets(i).Name <> "Overall Summary" And Worksheets(i).Name <> "Consolidated" And Worksheets(i).Name <> "MasterSheet" Then
LastRow = Worksheets(i).Select
Range("A1:K" & Range("A" & Rows.Count).End(xlUp).Row).Select
End If
Next
End Sub
What I want to achieve is this : ~Link to End Goal - Master_Data [~warning:-will immediately download as excel file]
Question is -
1. How to copy the selection
3. Create new file called Master_Data
2. How to paste the selection in new file [i.e. Master_Data workbook --> into single 'Client_Master' worksheet] one after the other vertically starting from column C.
3. Create additional helper columns A and B in new file [i.e. Client_Master worksheet] created with values from Report_Data --> individual sheet's A2 and B2 for each of the customer/client sheets.
Note : - Cell values at A2 and B2 in each of the individual customer/client wise sheets in Report_Data will always have name and date respectively.
Short Summary
Input>>Report_Data ----> is System generated report has 250+ worksheets, i.e. 1 each for the client
Output>>Master_Data ----> end goal is create this file/workbook with single worksheet named 'Client_Master' having all the data of 250+ clients one after the other with additional helper column A and B, the values of which will be taken from each of A2 and B2 of individual sheets in Report_Data workbook.