Hi, Im currently looking to to create a macro that will pull together entries from multiple worksheets and paste them into a single table on my main worksheets. This involves matching the names in column A to the names on worksheets for each month and matching the correct monthly value based on the headers above.
eg. the output is a table like so with every end of working week and colleague
[TABLE="width: 500"]
<tbody>[TR]
[TD]Colleague[/TD]
[TD]7/7/17[/TD]
[TD]14/7/17[/TD]
[TD]21/7/17[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 478"]
<colgroup><col><col span="4"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
and the data itself is split across similar tables on multiple worksheets
My current code is just manually copying each row and pasting it like so with repeats of the same code for each individual
Sub report1()
'
' report1 Macro
' gathering rag statuses
'Application.ScreenUpdating = False
Sheets("July 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B19").Select
ActiveSheet.Paste
Sheets("August 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("F19").Select
ActiveSheet.Paste
Sheets("September 2017").Select
Range("G50:K50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("J19").Select
ActiveSheet.Paste
Sheets("October 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("O19").Select
ActiveSheet.Paste
Sheets("November 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("S19").Select
ActiveSheet.Paste
Sheets("December 2017").Select
Range("G50:K50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("W19").Select
ActiveSheet.Paste
Range("B4:AA19").Select
Application.ScreenUpdating = True
End Sub
eg. the output is a table like so with every end of working week and colleague
[TABLE="width: 500"]
<tbody>[TR]
[TD]Colleague[/TD]
[TD]7/7/17[/TD]
[TD]14/7/17[/TD]
[TD]21/7/17[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 478"]
<colgroup><col><col span="4"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
and the data itself is split across similar tables on multiple worksheets
My current code is just manually copying each row and pasting it like so with repeats of the same code for each individual
Sub report1()
'
' report1 Macro
' gathering rag statuses
'Application.ScreenUpdating = False
Sheets("July 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B19").Select
ActiveSheet.Paste
Sheets("August 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("F19").Select
ActiveSheet.Paste
Sheets("September 2017").Select
Range("G50:K50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("J19").Select
ActiveSheet.Paste
Sheets("October 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("O19").Select
ActiveSheet.Paste
Sheets("November 2017").Select
Range("G50:J50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("S19").Select
ActiveSheet.Paste
Sheets("December 2017").Select
Range("G50:K50").Select
Selection.Copy
Sheets("Sheet2").Select
Range("W19").Select
ActiveSheet.Paste
Range("B4:AA19").Select
Application.ScreenUpdating = True
End Sub