ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check for "#VALUE!" (https://www.excelbanter.com/excel-discussion-misc-queries/30654-check-%22-value-%22.html)

carlyman

Check for "#VALUE!"
 

I know it is possible to do by writing a script....but is there a way to
check if a function returns "#VALUE!" logically?

*Simple example: *
SEARCH("e","1234") returns #VALUE!.
I'd like to say IF(SEARCH("e","1234")="#VALUE!","ERROR","No Error")

Thanks!


--
carlyman
------------------------------------------------------------------------
carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
View this thread: http://www.excelforum.com/showthread...hreadid=379062


Duke Carey

try

=if(iserr(search(...)),"Error","No error")

"carlyman" wrote:


I know it is possible to do by writing a script....but is there a way to
check if a function returns "#VALUE!" logically?

*Simple example: *
SEARCH("e","1234") returns #VALUE!.
I'd like to say IF(SEARCH("e","1234")="#VALUE!","ERROR","No Error")

Thanks!


--
carlyman
------------------------------------------------------------------------
carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
View this thread: http://www.excelforum.com/showthread...hreadid=379062



MrShorty


Would the ISERROR function serve your purpose, or do you need to
distinguish the #VALUE error from other errors?


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=379062


carlyman


I can work around it using ISERROR, but I was hoping to implement
something more based on what type of error it was.


--
carlyman
------------------------------------------------------------------------
carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
View this thread: http://www.excelforum.com/showthread...hreadid=379062


MrShorty


In that case, there's the ERROR.TYPE function.


--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=379062



All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com