Created
April 10, 2018 15:58
-
-
Save fuchao2012/9a5a55b6abaf9c9c63568ba20f3e7917 to your computer and use it in GitHub Desktop.
制作工资条
This file contains 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 制作工资条() | |
' | |
' 制作工资条 | |
' | |
ActiveWindow.SmallScroll Down:=-3 | |
'选择当前激活单元格所在的行 | |
ActiveCell.Rows("1:1").EntireRow.Select | |
'复制选择项 | |
Selection.Copy | |
'激活的单元格开始,移动(向下2,向右0),移动完成的单元格为当前激活单元格,并选中所在行 | |
ActiveCell.Offset(2, 0).Rows("1:1").EntireRow.Select | |
'这一句就是将复制的内容粘贴,记住就就行了 Selection.Insert Shift:=xlDown | |
Selection.Insert Shift:=xlDown | |
'选中当前单元格并进入循环 | |
ActiveCell.Select | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment