boolean to integer
On Tue, 13 Jan 2004 03:49:24 -0800, "sphenisc"
wrote:
Can I convert a boolean expression e.g. (m=2), into a 1 or
0 during a VBA calculation without resorting to if
statements or the like?
Thanks
You can just use it in a mathematical expression and it will convert
automagically.
However, you must be aware that in VBA, FALSE = 0 and TRUE = -1.
So you may want to use a Unary or an ABS function.
--ron
|