If ( N = 2 * M ) And ( Q = 3 * M ) Then
msgbox ("符合价格关系")
else
msgbox ("不符合价格关系")
End If作者: lvguobin 时间: 2009-6-18 13:47
Dim n
n="$160"
Dim m
m="$320"
Dim s
s="$480"
a=cdbl(mid(n,2,6))
b=cdbl(mid(m,2,6))
k=cdbl(mid(s,2,6))
If (b=2*a) and (k=3*a) Then
msgbox "ture",1,"massage"
else
msgbox "false"
End If
我试了一下没问题,结果是TRUE