View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Trapping #VALUE! error

=IF(ISNUMBER(FIND("/",A1)),--MID(A1,1,FIND("/",A1)-1),A1)


--
Regards,

Peo Sjoblom




"RhysPieces" wrote in message
...
I am using a MID function to extract numbers from a string:
=--MID(A1,1,FIND("/",A1)-1)
If the string does not contain "/", it results in the #VALUE! error.
What code needs to go in front of the formula to trap this and return ""?

Thank you for your replies.