Hi everyone!
I have the code below to run for Paste Special (xlPasteFormulas, xlPasteValues)
Sub CopyAsValues()
'Pressing Ctrl + Shift + Z to run macro Paste Special
'1 Copy Paste Formula from A5 to Range AC6:AC118880
'2 Copy Paste Values from Range AC5:AC11800 to AB5:AB118880
'3 Copy Paste Values AC6:AC118880 ( only Cell AC5 retains the formula )
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AC5").Copy
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AC6:AC11880").PasteSpecial _
xlPasteFormulas
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AC5").Copy
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AB5:AB11880").PasteSpecial _
xlPasteValues
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AC5").Copy
Application.Workbooks("New Master TP 2018 - Copy.xlsm").Worksheets("TestPack Master").Range("AC6:AC11880").PasteSpecial _
xlPasteValues
Application.CutCopyMode = False
End Sub
------My concern is how to make the . Range("AC6:AC11880") & .Range("AB5:AB11880") dynamic,
so that when I am going to add "4 or more Data" the Range should also be increasing to something like . Range("AC6:AC11884") & .Range("AB5:AB11884)
Any help is really appreciated.
Thanks in advance,
Rev12
Bookmarks