+4 votes
in General IT Tips by (71.8k points)

I want to put boolean value (1/0) in a column depending on the value in another column. But when I write the formula, it prints TRUE/FALSE. How can I convert TRUE/FALSE to 1/0?

E.g.

In cell E2, I wrote the following formula to print 1/0, but it printed TRUE/FALSE. 

=D2>0.5

1 Answer

+1 vote
by (349k points)
selected by
 
Best answer

If you multiply by 1, TRUE/FALSE will convert to 1/0.

In the spreadsheet, make the following change in cell E2 to print 1/0.

Replace

=D2>0.5

with

=(D2>0.5)*1


...