CordingBags
New Member
- Joined
- Mar 7, 2022
- Messages
- 43
- Office Version
- 2016
- Platform
- Windows
I have a macro that is designed to copy in a master layout area from one sheet, OD LEG, to another.
The workbook contains in excess of a dozen sheets each with a different unrelated name.
It would like it to apply to whichever sheet I am working on at the time, not just as in this case MENS MAT 1.
Copying the master layout area, which is always on sheet OD LGE, to the current sheet, then returning the cursor to the current sheet.
Current MACRO is set to paste special, formulas, ignoring blanks. Have I got to repeat to paste special formats ignoring blanks or can that be included?
Have tried using "Relative References" during macro record but that didn't help.
Many Thanks
Paul
Sub Copy_In_OD_LGE_Layout()
'
' ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("OD LGE").Select
Range("AJ1:AL318").Select
Selection.Copy
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("MENS EVE LGE 1").Select
Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=True, Transpose:=False
Range("Q19").Select
End Sub
Sheets("MENS MAT 1").Select
End Sub
The workbook contains in excess of a dozen sheets each with a different unrelated name.
It would like it to apply to whichever sheet I am working on at the time, not just as in this case MENS MAT 1.
Copying the master layout area, which is always on sheet OD LGE, to the current sheet, then returning the cursor to the current sheet.
Current MACRO is set to paste special, formulas, ignoring blanks. Have I got to repeat to paste special formats ignoring blanks or can that be included?
Have tried using "Relative References" during macro record but that didn't help.
Many Thanks
Paul
Sub Copy_In_OD_LGE_Layout()
'
' ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("OD LGE").Select
Range("AJ1:AL318").Select
Selection.Copy
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("MENS EVE LGE 1").Select
Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=True, Transpose:=False
Range("Q19").Select
End Sub
Sheets("MENS MAT 1").Select
End Sub