设置单元格格式
'编号
If Range("l6") = "" Then
bh = Format(Now, "yyyymmdd") & "001"
Range("l6") = bh
End If
'编号
If Format(Now, "yyyymmdd") = Left(Cells(6, 12), 8) Then
bh = Format(Now, "yyyymmdd") & Right("000000" & CStr(CInt(Right(Cells(6, 12), 3)) + 1), 3)
Range("l6") = bh
Else
bh = Format(Now, "yyyymmdd") & "001"
Cells(6, 12) = bh
End If
把问题作为内容、样表(03版,把现状和目标效果表示出来)作为附件发来看下 yqch134@163.com