jamesplant77
New Member
- Joined
- Nov 13, 2015
- Messages
- 4
Hi, I am really new to VBA and I have created a number of workbooks that Project Managers are required to complete and submit to a folder each month:
M:\Business Change - Projects\PMO\JAMES - TEST\Demand Management\Resource Forecasts
The only tab they are required to complete is the one titled FORECAST. Once all workbooks have submitted, I want to be able to run a macro that takes all data from row 6 onwards, in each workbook and paste to the open workbook from row A6 which is exactly the same layout as the individual workbooks.
I would also need the code to stop at the last row that contained data, then move onto the next workbook and then paste that data on the next empty row in the master. I have masses of MI that will be taken from the master sheet, so really need this to work.
I have pasted the headers that appear in the master and the workbooks below, headers are in cells A4, B4 etc and the data I need is in the range A6:BO6
[TABLE="width: 1223"]
<colgroup><col style="width: 158pt; mso-width-source: userset; mso-width-alt: 7716;" width="211"> <col style="width: 80pt; mso-width-source: userset; mso-width-alt: 3913;" width="107"> <col style="width: 209pt; mso-width-source: userset; mso-width-alt: 10203;" width="279"> <col style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;" span="2" width="111"> <col style="width: 188pt; mso-width-source: userset; mso-width-alt: 9179;" width="251"> <col style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;" width="50"> <col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" span="12" width="42"> <tbody>[TR]
[TD="class: xl75, width: 211, bgcolor: #B1A0C7"]ROLE[/TD]
[TD="class: xl73, width: 107, bgcolor: #B1A0C7"]COST P/D[/TD]
[TD="class: xl75, width: 279, bgcolor: #B1A0C7"]PROJECT NAME[/TD]
[TD="class: xl73, width: 111, bgcolor: #B1A0C7"]PROJECT ID (COST CENTRE)[/TD]
[TD="class: xl73, width: 111, bgcolor: #B1A0C7"]STATUS[/TD]
[TD="class: xl73, width: 251, bgcolor: #B1A0C7"]NAME OF RESOURCE[/TD]
[TD="class: xl75, width: 50, bgcolor: #B1A0C7"]FTE[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]F[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]M[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]A[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]M[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]A[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]S[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]O[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]N[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]D[/TD]
[/TR]
[TR]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]19[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]23[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: white"] [/TD]
[TD="class: xl72, bgcolor: white"] [/TD]
[TD="class: xl68, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl68, bgcolor: white"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[/TR]
</tbody>[/TABLE]
M:\Business Change - Projects\PMO\JAMES - TEST\Demand Management\Resource Forecasts
The only tab they are required to complete is the one titled FORECAST. Once all workbooks have submitted, I want to be able to run a macro that takes all data from row 6 onwards, in each workbook and paste to the open workbook from row A6 which is exactly the same layout as the individual workbooks.
I would also need the code to stop at the last row that contained data, then move onto the next workbook and then paste that data on the next empty row in the master. I have masses of MI that will be taken from the master sheet, so really need this to work.
I have pasted the headers that appear in the master and the workbooks below, headers are in cells A4, B4 etc and the data I need is in the range A6:BO6
[TABLE="width: 1223"]
<colgroup><col style="width: 158pt; mso-width-source: userset; mso-width-alt: 7716;" width="211"> <col style="width: 80pt; mso-width-source: userset; mso-width-alt: 3913;" width="107"> <col style="width: 209pt; mso-width-source: userset; mso-width-alt: 10203;" width="279"> <col style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;" span="2" width="111"> <col style="width: 188pt; mso-width-source: userset; mso-width-alt: 9179;" width="251"> <col style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;" width="50"> <col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" span="12" width="42"> <tbody>[TR]
[TD="class: xl75, width: 211, bgcolor: #B1A0C7"]ROLE[/TD]
[TD="class: xl73, width: 107, bgcolor: #B1A0C7"]COST P/D[/TD]
[TD="class: xl75, width: 279, bgcolor: #B1A0C7"]PROJECT NAME[/TD]
[TD="class: xl73, width: 111, bgcolor: #B1A0C7"]PROJECT ID (COST CENTRE)[/TD]
[TD="class: xl73, width: 111, bgcolor: #B1A0C7"]STATUS[/TD]
[TD="class: xl73, width: 251, bgcolor: #B1A0C7"]NAME OF RESOURCE[/TD]
[TD="class: xl75, width: 50, bgcolor: #B1A0C7"]FTE[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]F[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]M[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]A[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]M[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]J[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]A[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]S[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]O[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]N[/TD]
[TD="class: xl66, width: 42, bgcolor: #F2F2F2"]D[/TD]
[/TR]
[TR]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]19[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]23[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]20[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]22[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[TD="class: xl71, bgcolor: #F2F2F2"]21[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: white"] [/TD]
[TD="class: xl72, bgcolor: white"] [/TD]
[TD="class: xl68, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl69, bgcolor: white"] [/TD]
[TD="class: xl68, bgcolor: white"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[TD="class: xl70, bgcolor: #95B3D7"] [/TD]
[/TR]
</tbody>[/TABLE]