Hi All,
This is my first post and I'm relatively new to VBA so bear with me here. I'm trying to establish some code to copy data from one tab and paste it to other tabs according to multiple criteria. Here's some more background info:
Data Input:
Cell "A2" contains the Data Date
Cell "C1" contains the Project Name
Cells "B8:B69" contain Equipment Type
Cells "C8:C69" contain Adjusted Equipment Hours
Cells "E8:E69" contain Actual Equipment Hours
This information is then repeated in the adjacent columns with the exception of the referenced Data Date and Equipment Type; these cells remain the same.
The goal is to copy the Adjusted Equipment Hours and Actual Equipment Hours from the Data Input sheet and paste them to the matching equipment type and date found in another sheet of the workbook. The data must be copied to the worksheet/tab matching the project name listed in the Data Input sheet. Additionally, the data will be pasted to the columns on a regular basis matching the listed date in order to develop a historical database. I've copied some of the cells below to see how it looks. I'll try to attach the worksheet. Anything helps.
Cheers
"Data Input" Tab:
[TABLE="width: 917"]
<tbody>[TR]
[TD]Week ending[/TD]
[TD]Project Name[/TD]
[TD="colspan: 3"]Project 1[/TD]
[TD="colspan: 3"]Project 2[/TD]
[/TR]
[TR]
[TD]01-Jan[/TD]
[TD]SPO[/TD]
[TD="colspan: 3"][/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Paid Hours per 24hr period[/TD]
[TD="colspan: 3"]12[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Days Off[/TD]
[TD="colspan: 3"]0[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD]Sequencing Period[/TD]
[TD]Weather Delays (days)[/TD]
[TD="colspan: 3"]0[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Availability[/TD]
[TD="colspan: 3"]80%[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Plan vs. Actual[/TD]
[TD]Forecasted Units[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Forecasted Units[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 1[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 2[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 3[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 584"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
"Project 1" Tab
[TABLE="width: 707"]
<tbody>[TR]
[TD]Week Ending[/TD]
[TD="colspan: 3"]1-Jan-14[/TD]
[TD="colspan: 3"]8-Jan-14[/TD]
[/TR]
[TR]
[TD]Plan vs. Actual[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Variance[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Variance[/TD]
[/TR]
[TR]
[TD]Unit 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Unit 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Unit 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
This is my first post and I'm relatively new to VBA so bear with me here. I'm trying to establish some code to copy data from one tab and paste it to other tabs according to multiple criteria. Here's some more background info:
Data Input:
Cell "A2" contains the Data Date
Cell "C1" contains the Project Name
Cells "B8:B69" contain Equipment Type
Cells "C8:C69" contain Adjusted Equipment Hours
Cells "E8:E69" contain Actual Equipment Hours
This information is then repeated in the adjacent columns with the exception of the referenced Data Date and Equipment Type; these cells remain the same.
The goal is to copy the Adjusted Equipment Hours and Actual Equipment Hours from the Data Input sheet and paste them to the matching equipment type and date found in another sheet of the workbook. The data must be copied to the worksheet/tab matching the project name listed in the Data Input sheet. Additionally, the data will be pasted to the columns on a regular basis matching the listed date in order to develop a historical database. I've copied some of the cells below to see how it looks. I'll try to attach the worksheet. Anything helps.
Cheers
"Data Input" Tab:
[TABLE="width: 917"]
<tbody>[TR]
[TD]Week ending[/TD]
[TD]Project Name[/TD]
[TD="colspan: 3"]Project 1[/TD]
[TD="colspan: 3"]Project 2[/TD]
[/TR]
[TR]
[TD]01-Jan[/TD]
[TD]SPO[/TD]
[TD="colspan: 3"][/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Paid Hours per 24hr period[/TD]
[TD="colspan: 3"]12[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Days Off[/TD]
[TD="colspan: 3"]0[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD]Sequencing Period[/TD]
[TD]Weather Delays (days)[/TD]
[TD="colspan: 3"]0[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Availability[/TD]
[TD="colspan: 3"]80%[/TD]
[TD="colspan: 3"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Plan vs. Actual[/TD]
[TD]Forecasted Units[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Forecasted Units[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 1[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 2[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Unit 3[/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 584"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
"Project 1" Tab
[TABLE="width: 707"]
<tbody>[TR]
[TD]Week Ending[/TD]
[TD="colspan: 3"]1-Jan-14[/TD]
[TD="colspan: 3"]8-Jan-14[/TD]
[/TR]
[TR]
[TD]Plan vs. Actual[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Variance[/TD]
[TD]Adjusted Equipment Hours[/TD]
[TD]Actual Equipment Hours[/TD]
[TD]Variance[/TD]
[/TR]
[TR]
[TD]Unit 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Unit 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Unit 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]