1.根据计算日期进行日期提取并自定义单据号(凭个人自行建立规格)
日期提取函数:IF(E2="","",CONCATENATE(YEAR(E2),IF(MONTH(E2)<10,CONCATENATE("0",MONTH(E2)),MONTH(E2))))
单据号:可自行定义单据号规则或者设置辅助列,"A"&B2&"000"&C2,此单据号是工资单进行索引工资明细内容的唯一条件;
2.工资详情单
2.1根据工资计算表的计算项目设计工资详情单格式及所需要确认的项目;
2.2通过函数索引单据号,查找并返回所需要的工资单项目内容:IFERROR(VLOOKUP($G$5,工资明打印细表!$A:$M,COLUMN(工资明打印细表!J:J),0),"")
3.设置相关控件,并设置宏代码;WPS版本需要自行安装VBA支持库;Office2007本身自带VBA;
Private Sub CommandButton1_Click()
[b2] = [g1]
For i = [g1] To [g2]
ActiveSheet.PrintOut
[b2] = [b2] 1
Next
End Sub
Private Sub 加1_CLICK()
[b2] = [b2] 1
End Sub
Private Sub CommandButton2_Click()
ActiveSheet.PrintOut
[b2] = [b2] 1
End Sub
Private Sub CommandButton3_Click()
[b2] = [b2] - 1
End Sub
Private Sub CommandButton4_Click()
[b2] = [b2] 1
End Sub
评论 (0)