Hi All,
This is my first time, trying to work with a recorded MACRO in EXCEL 2016
I have two workbooks: A & B.
Workbook A - Has data, Is editable, with 3 sheets.
Workbook B - Has 100 forms/sheets that are protected, can only paste data into the form, doesn't show me the Sheet number.
I have recorded a MACRO, to copy the data from Workbook A (Sheet 1) to Workbook B (Active Sheet, since the sheet no. is hidden/not known), but it's extremely slow. Below is the code.
Is there anything I can do to make it faster?
This is my first time, trying to work with a recorded MACRO in EXCEL 2016
I have two workbooks: A & B.
Workbook A - Has data, Is editable, with 3 sheets.
Workbook B - Has 100 forms/sheets that are protected, can only paste data into the form, doesn't show me the Sheet number.
I have recorded a MACRO, to copy the data from Workbook A (Sheet 1) to Workbook B (Active Sheet, since the sheet no. is hidden/not known), but it's extremely slow. Below is the code.
Is there anything I can do to make it faster?
VBA Code:
Sub RANDOM_PASTE()
'
' RANDOM_PASTE Macro
'
' Keyboard Shortcut: Ctrl+Shift+P
'
Range("C2:C5").Select
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("C2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("F5:H5").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("F5:H5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("C7:L10").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("C7:L10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("I13:I35").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("I13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("O12:O19").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("O12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("O22:O25").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("O22:O23").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("O28:O30").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("O28").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("O33:O35").Select
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Windows("AIO_MACRO.xlsm").Activate
Windows("All in one - Random Audits.xlsx").Activate
Range("O33").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Application.CutCopyMode = False
Range("L38:L49").Select
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("L38").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Range("N46:O57").Select
Application.CutCopyMode = False
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("N46:O57").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Application.CutCopyMode = False
Range("B70:L100").Select
Selection.Copy
Windows("All in one - Random Audits.xlsx").Activate
Range("B70:L100").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, skipBlanks:=False, Transpose:=False
Windows("AIO_MACRO.xlsm").Activate
Application.CutCopyMode = False
End Sub