Created
September 24, 2020 06:22
-
-
Save TerenceLiu98/d09fd87ecde8e6eac936ba632f72a0f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub BatchCopy() | |
Application.ScreenUpdating = False 'turnoff screen refresh | |
For i = 5 To 2 Step -1 | |
For n = 1 To 3 | |
Rows(i & ":" & i).Select | |
Selection.Copy | |
Selection.Insert Shift:=xlDown | |
Next n | |
Next i | |
Application.ScreenUpdating = True | |
End Sub |
Sub remove_rows()
Dim x As Long
Application.ScreenUpdating = False
For x = 297 To 1 Step -5
Range(x & ":" & x - 3).EntireRow.Delete
Next x
Application.ScreenUpdating = True
End Sub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
code from ZHIHU