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.

ISBINARY is mostly a validation function. It is useful when a workbook receives codes or masks as text and needs to confirm that the value is truly binary before another conversion or bit-related formula tries to use it.

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 example checks whether a text value is a valid binary string. The only allowed characters are 0 and 1, so the formula is testing the input before anything else is done with it.

That is useful when the next step depends on clean binary text, such as validation, conversion, or a rule that should reject bad machine-style input right away.

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

In cell D2, check whether the value is valid binary.

Example 2 - Catch an invalid digit

This example shows that one wrong character is enough to fail the test. Even if most of the string looks correct, a digit such as 2 makes it invalid as binary text.

That helps you catch bad input early instead of passing it into later formulas where the problem may become harder to see.

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

In cell D3, check whether a string with the wrong digit still counts as binary.

Example 3 - Accept leading zeros

This example is useful because some learners think leading zeros make the value invalid. They do not. A binary string can still be valid even when it starts with several zeros.

That matters when the worksheet stores fixed-length codes, bit patterns, or padded values where the leading zeros are part of the expected format.

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

In cell D4, check whether the cell value is valid binary.

Example 4 - Use it in a gate

Here the binary check is used inside an IF formula, so the sheet can show a friendly result instead of only TRUE or FALSE. The logic acts like a gate in front of the next step.

This is a practical pattern when a workbook should label input as clean or invalid before a conversion or calculation is allowed to continue.

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

In cell D5, check whether a dirty input is valid binary.

Conclusion Recap

ISBINARY is useful when binary text has to be checked before you use it. In this lesson, that meant testing clean binary strings, catching bad digits, and stopping dirty input from moving into later formulas.

The function gives a simple TRUE or FALSE answer, which makes it useful as a gate before conversions or validation steps.

  • 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
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.