- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
VBE¤@¯ë¼Ò²Õ¶K¤J¥H¤Uµ{¦¡½X:
Function GetSerNo(Rng As Range) As String
Dim A, T0$, T$, T1$, V0, V1, V2, TT$
For Each A In Rng
If A = "" Then GoTo 101
T0 = Left(A, 2): V0 = Mid(A, 3)
If T0 <> T1 Or Val(V0) - Val(V2) <> 1 Then
T = T1 & V1 & IIf(V1 = V2, "", "~" & T1 & V2)
TT = Trim(TT & " " & T)
T1 = T0: V1 = V0: V2 = V0
Else
V2 = V0
End If
101: Next
TT = Trim(TT & " " & T1 & V1 & IIf(V1 = V2, "", "~" & T1 & V2))
GetSerNo = Replace(TT, " ", ",")
End Function
==============================
E2/¤½¦¡:
=IF(C2="","",GetSerNo(OFFSET(A2,,,C2)))
¤U©Ô§Y¥i
===== |
|