Converting TRUE/FALSE from AND to number, like 1 or 0

J

Joe M.

I would like to have results of AND() appear as 1 or zero instead of TRUE or
FALSE. I tried to use IF to check for true or false but for some reason this
doesnt work. Can someone help?

Thanks,
Joe M.
 
M

Mike H

Hi,

Simply multiply your and formula by 1 to turn true/false into 1 or zero

=AND(A1=1,B1=1)*1

Mike
 
D

Dave Peterson

=--(and(yourexpressionhere))

The first minus sign will convert True to -1 and the second will change it to 1.
 
D

David Biddulph

=--AND(A1,B1)
but IF should work if you want to use it
=IF(AND(A1,B1),1,0) or (adding unnecessarily)
=IF(AND(A1,B1)=TRUE,1,0)
 
Top