Hi all,
I've been trying to write a macro. Currently, I have a workbook with lots of sheets within it. Each of those sheets contain a value in "A1", which is the name of the sheet and also duplicated in a 'master' sheet containing a summary of all the worksheets.
I am trying to copy selected data from any sheet and paste it into the relevant row on the master sheet. This is all I've managed to write so far and it works up until the point where data needs to be pasted:
Hoping somebody can help. Been trying on and off for days trying different methods!
I've been trying to write a macro. Currently, I have a workbook with lots of sheets within it. Each of those sheets contain a value in "A1", which is the name of the sheet and also duplicated in a 'master' sheet containing a summary of all the worksheets.
I am trying to copy selected data from any sheet and paste it into the relevant row on the master sheet. This is all I've managed to write so far and it works up until the point where data needs to be pasted:
VBA Code:
Sub Finished_Updating()
If MsgBox("Are you sure you have finished updating this consultant?", vbYesNo) = vbNo Then Exit Sub
Range("A1").Select
Selection.Copy
Sheets("Document Date Log").Select
Range("Z1").Select
Range("Z1").PasteSpecial
Columns("A:A").Select
Cells.Find(What:=Range("Z1").Value, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
ActiveSheet.Previous.Select
Range("H5:H16").Select
Selection.Copy
Sheets("Document Date Log").Select
Range("B" & Cells.Rows.Count).End(xlUp).Select
''THIS IS THE POINT AT WHICH EXCEL NEEDS TO MAKE ROW IT FOUND EARLIER ACTIVE, AND THEN PASTE IN COLUMN "B" (the number of cells to copy will always be the same)
'' Below is the code to paste the copied data transposed.
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
ActiveSheet.Visible = xlSheetHidden
Sheets("Main_Page").Activate
End Sub
Hoping somebody can help. Been trying on and off for days trying different methods!