Sub cmd()
Dim LRn As Integer
Dim i As Integer
Dim j As Integer
With Sheet2
For i = 2 To .Range("a65535").End(xlUp).Row
For j = 7 To 1 Step -1
If .Cells(i, j + 1) <> "" Then
.Range("I" & i) = .Cells(1, j + 1)
Exit For
End If
Next j
Next i
End With
End Sub
Sub 查找月份()
Dim i As Integer, j As Integer
For i = 2 To 7
If Cells(i, "I") = "" Then
j = Cells(i, "I").End(xlToLeft).Column
Else
Cells(i, "I").Select
End If
Cells(i, "I") = Cells(i, j).Offset(-i + 1, 0).Value
Next i
End Sub
Sub 清空()
Range("i2:i7").ClearContents
End Sub