How do I recognize "#VALUE!" in Excel spreadsheets?

ExcelExcel Formula

Excel Problem Overview


I'd like to write a formula such that if cell A1 displays #VALUE!, say TRUE in cell B1.

Here's my formula in cell B1:

=IF(A1="#VALUE!", "TRUE", "FALSE")

I get FALSE when A1 does not say #VALUE! so that part is fine. But, when it does say #VALUE!, I get a #VALUE! error in cell B1, when I want it to say TRUE. How do I do this?

Excel Solutions


Solution 1 - Excel

Use IFERROR(value, value_if_error)

Solution 2 - Excel

This will return TRUE for #VALUE! errors (ERROR.TYPE = 3) and FALSE for anything else.

=IF(ISERROR(A1),ERROR.TYPE(A1)=3)

Solution 3 - Excel

in EXCEL 2013 i had to use IF function 2 times: 1st to identify error with ISERROR and 2nd to identify the specific type of error by ERROR.TYPE=3 in order to address this type of error. This way you can differentiate between error you want and other types.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionphanView Question on Stackoverflow
Solution 1 - ExcelCharlehView Answer on Stackoverflow
Solution 2 - ExcelExcellllView Answer on Stackoverflow
Solution 3 - ExcelMirec TkáčView Answer on Stackoverflow