PDA

View Full Version : regarding IF commands into VBA



strikermail
08-12-2010, 02:28 PM
Hi,

Is there a possibility to make a VBA with this?


=IF((A1+B2)>255,(A1+B2)-256,A1+B2)
= IF((A2+B3)>255,(A2+B3)-256,A2+B3)
= A3

Artik
08-12-2010, 03:15 PM
egSub AAA()
'=IF((A1+B2)>255,(A1+B2)-256,A1+B2)
If [A1] + [B2] > 255 Then
MsgBox [A1] + [B2] - 256
Else
MsgBox [A1] + [B2]
End If

End Sub

Artik