2. 生成工资条:
=IF(MOD(ROW(),2),INDEX(A:A,INT(ROW($A4)/2)),A$1)
3. 插入生成工资条图片按钮(以便分享发放):
Sub 工资条()
Dim w, h, i
For i = 2 To 16 Step 2
w = Range("G" & i & ":K" & i + 1).Width
h = Range("G" & i & ":K" & i + 1).Height
Range("G" & i & ":K" & i + 1).CopyPicture
With ActiveSheet.ChartObjects.Add(500, 100, w, h).Chart
.Parent.Select
.Paste
.Export "d:\" & Range("G" & i + 1) & ".jpg"
.Parent.Delete
End With
Next i
End Sub