|
Sub 格式化工资条()
Dim i%
i = Cells(Rows.Count, 1).End(xlUp).Row
For j = 1 To i
If j Mod 2 Then
With Cells(j, 1).EntireRow.Range("a1:g1").Font
.Bold = True
.Size = 8
.ColorIndex = 56
End With
Else
With Cells(j, 1).EntireRow.Range("a1:g1").Interior
.ColorIndex = 40
End With
End If
Next j
End Sub
Sub 清除格式化()
Selection.ClearFormats
End Sub
|
|