Function f1(t1, t2)
m = Val(Left(t1, InStr(t1, "分") - 1)) + Val(Left(t2, InStr(t2, "分") - 1))
s = Val(Mid(t1, InStr(t1, "分") + 1, Len(t1) - InStr(t1, "分") - 1)) + Val(Mid(t2, InStr(t2, "分") + 1, Len(t2) - InStr(t2, "分") - 1))
m = m + s \ 60
s = s Mod 60
f1 = m & "分" & s & "秒"
End Function
Function f2(t1, t2)
m = Val(Left(t1, InStr(t1, "分") - 1)) - Val(Left(t2, InStr(t2, "分") - 1))
s = Val(Mid(t1, InStr(t1, "分") + 1, Len(t1) - InStr(t1, "分") - 1)) - Val(Mid(t2, InStr(t2, "分") + 1, Len(t2) - InStr(t2, "分") - 1))
If s < 0 Then
m = m + s \ 60 - 1
s = s + 60 * (1 - s \ 60)
End If
f2 = m & "分" & s & "秒"
End Function
根本不需要vba,简单的加减法再用text就可以了