|
参与一下。。。
- Private Sub Worksheet_Change(ByVal T As Range)
- Application.EnableEvents = False
- Set d = CreateObject("Scripting.Dictionary")
- today = Format(Date, "yyyymmdd")
- yf = Mid(today, 5, 2)
- If T.Row > 4 And T.Column = 2 Then
- r = Me.Cells(Rows.Count, 2).End(3).Row
- For i = 5 To r
- s = Left(Me.Cells(i, 4), 6)
- d(s) = d(s) + 1
- Next
- Me.Cells(T.Row, 4) = today
- s = Left(today, 6)
- d(s) = d(s) + 1
- Me.Cells(T.Row, 3) = "【" & Left(today, 4) & "】" & yf & "-" & Format(d(s), "000")
- End If
- Application.EnableEvents = True
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|