# How to Convert the True and False Values to 1 and 0 in MS Excel

> To convert true and false values to 1 and 0 in Microsoft Excel, select the target cell, click the formula bar, and enclose your formula in parentheses. Next, add a double dash before the equals sign to form an expression like =--(N3>5000), then press enter to run the revised formula.

Canonical: https://livedemo.ai/tutorials/how-to-convert-the-true-and-false-values-to-1-and-0-in-ms-excel/
Apps: Excel
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a35b8ab56e05a00fda2b6/preview?step=1

## Steps

1. Inside your Microsoft Excel worksheet, select the cell that contains the true and false values you wish to edit.
2. After that, head over to the ribbon section and click the formula bar.
3. Enclose the formula in parentheses as shown in the example: (N3>5000).
4. Subsequently, add two dash lines (-) next to the equals sign. Follow this format: '=--(N3>5000)'. Once done, press the enter key to run the newly revised formula.
5. After completing these steps, the true and false values from the selected cells will be converted to 1 or 0.
