
Return TRUE when a value is a valid binary string made only of 0s and 1s.
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.
Returns TRUE only when the value is made of 0s and 1s.
TRUE means the value is valid binary. FALSE means it is not.
=ISBINARY(value)
Use a cell reference or a typed string. For example, =ISBINARY("1011") returns TRUE, while =ISBINARY("1021") returns FALSE.
| 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. |
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.
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.
In cell D2, check whether the value is valid binary.
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.
In cell D3, check whether a string with the wrong digit still counts as binary.
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.
In cell D4, check whether the cell value is valid binary.
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")
In cell D5, check whether a dirty input is valid binary.
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.
ISBINARY checks whether a value is valid binary text.Tell your friends about this post