What is the Excel formula to convert boolean values {FALSE, TRUE} into {0, 1}?
Supposing there is one shorter than =IF(cond,1,0).
|
What is the Excel formula to convert boolean values Supposing there is one shorter than |
||||
|
|
|
You could do it by casting. The "int" function rounds to the nearest integer. If the boolean value is in A1, the formula would be:
|
|||||||
|
|
Multiply it by '1'. ex. True * 1 = 1 and False * 1 = 0. For example, if cell A1 contains the boolean value, in a neighbouring cell, enter the formula:
Note: --True, True+0 and True/1 have the same effect. |
|||||||||
|
|
|
|||
|
|