ISBINARY Function

ISBINARY Function

ISBINARY Function

Return TRUE when a value is a valid binary string made only of 0s and 1s.

ExcelClash Team
PUBLISHED

Summary

ISBINARY checks whether a value is a valid binary string. If the value contains only 0 and 1, it returns TRUE. If it contains anything else, it returns FALSE.

This is mostly useful as a safety check before you run functions like BIN2DEC. It helps you stop bad inputs early instead of letting one wrong character turn into an error later.

Purpose

Validate binary text

Returns TRUE only when the value is made of 0s and 1s.

Return Value

TRUE or FALSE

TRUE means the value is valid binary. FALSE means it is not.

Syntax

=ISBINARY(value)

Use a cell reference or a typed string. For example, =ISBINARY("1011") returns TRUE, while =ISBINARY("1021") returns FALSE.

Arguments

  • value - [required] The text or cell value you want to test.

ISBINARY vs Other Functions

Function Main job Use it when
ISBINARY Checks if a string is valid binary You want to validate binary input first.
BIN2DEC Converts binary to decimal You already trust the input and want the decimal result.
ISTEXT Checks whether something is text You only care whether the value is text, not whether it is valid binary.
ISNUMBER Checks whether something is numeric You need a number test rather than a binary-format test.

Using ISBINARY

The usual pattern is simple: test first, convert second. If you run BIN2DEC on a bad string, Excel throws an error. If you run ISBINARY first, you can stop the bad value before that happens.

It also helps when your binary codes have leading zeros. A value like "0011" is still valid binary, and ISBINARY handles that correctly.

  • Use it before binary conversions.
  • Use it to flag bad machine or register input.
  • Use it with IF when you want a readable message instead of TRUE or FALSE.

Example 1 - Check a valid binary string

This is the basic use.

=ISBINARY("1010") // Returns TRUE.
Check Answer
Challenge #1
Target: Sheet1!F1
Valid Binary

Check whether "1010" is valid binary. Formula: =ISBINARY("1010").

Example 2 - Catch an invalid digit

The value fails as soon as one non-binary digit appears.

=ISBINARY("1021") // Returns FALSE.
Check Answer
Challenge #2
Target: Sheet1!F2
Invalid Digit

Check whether "1021" is valid binary. Formula: =ISBINARY("1021").

Example 3 - Accept leading zeros

Leading zeros are still part of a valid binary string.

=ISBINARY("00001101") // Returns TRUE.
Check Answer
Challenge #3
Target: Sheet1!F3
Cell Check

Check whether the value in A1 is valid binary. Formula: =ISBINARY(A1).

Example 4 - Use it in a gate

This is a cleaner way to handle invalid input.

=IF(ISBINARY(B1),"Clean","Invalid")
Check Answer
Challenge #4
Target: Sheet1!F4
Dirty Input

Check whether the value in B1 is valid binary. Formula: =ISBINARY(B1).

Conclusion Recap

  • Main job: ISBINARY checks whether a value is valid binary text.
  • What counts: Only 0 and 1 are allowed.
  • Leading zeros: They are valid.
  • Best use: Validate first, then convert.
Tactical Arena
Select Scenario:
Share ISBINARY Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.