This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /MS Excel

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

Updated on:
May 12, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to turn TRUE/FALSE values into 1s and 0s in Excel.

Quick summary

In Microsoft Excel, you can convert TRUE and FALSE values to 1 and 0 by wrapping a logical formula in parentheses and prefixing it with a double unary operator (--). This technique lets Excel treat Boolean results as numeric values, making them compatible with calculations and data analysis.


Steps

  1. Select the cell in your Excel worksheet that contains the TRUE or FALSE values you want to convert.
  2. Navigate to the ribbon and click the formula bar to begin editing the cell's formula.
  3. Enclose your logical formula in parentheses — for example, write it as (N3>5000).
  4. Add two dash lines (--) directly after the equals sign so the formula reads =--(N3>5000), then press Enter to run the updated formula.
  5. The TRUE and FALSE values in the selected cells will now display as 1 or 0.

📌 Why this matters

Converting TRUE and FALSE values to 1 and 0 in Microsoft Excel is essential for anyone working with logical formulas in data analysis, reporting, or financial modeling. Boolean results are non-numeric by default, which means they cannot be used directly in SUM, AVERAGE, or other arithmetic functions. By applying the double unary operator (--) to a logical expression, users instantly make their Boolean outputs numeric and compatible with the full range of Excel calculations. This simple formula technique eliminates manual data entry errors and streamlines workflows that depend on conditional numeric outputs.
Your product deserves an interactive demo
Start free
Similar Articles
MS Excel

How to Organize Dates by Week in Excel

Madhav Bhandari
Director of Marketing @ Storylane
MS Excel

How to Make Cells Fit Text Microsoft Excel

Madhav Bhandari
Director of Marketing @ Storylane
MS Excel

How to Make a Bar Graph in Microsoft Excel

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Buyer Hub
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Events & webinars
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it