你可以使用:
Dim yourvariable%
yourvariable = int(mid([B3],7,4))
或
Dim yourvariable%
yourvariable = int(Right([B3],4))
或
Dim yourvariable%
yourvariable = year(cdate([B3]))
考虑:
Sub dural()
Dim v As Variant
v = Split(Range("B3").Text, "/")(2)
MsgBox v
End Sub