Re: Trapping #VALUE! error
Here's one way:
=IF(ISERR(FIND("/",A1)),"",--MID(A1,1,FIND("/",A1)-1))
Or:
=IF(ISERR(FIND("/",A1)),"",--LEFT(A1,FIND("/",A1)-1))
--
Biff
Microsoft Excel MVP
"RhysPieces" <RhysPieces@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FFAA8CD0-0C13-4B70-A155-274B83770F1F@xxxxxxxxxxxxxxxx
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.
.
Relevant Pages
- Re: Trapping #VALUE! error
... Peo Sjoblom ... If the string does not contain "/", ... What code needs to go in front of the formula to trap this and return ""? ... (microsoft.public.excel.misc) - Re: Sum.if date is in an interval...
... thanks a lot for invaluable help! ... but that is counting a particular string. ... "Bernard Liengme" wrote: ... Microsoft Excel MVP ... (microsoft.public.excel.worksheet.functions) - Re: Sum.if date is in an interval...
... thanks a lot for invaluable help! ... but that is counting a particular string. ... "Bernard Liengme" wrote: ... Microsoft Excel MVP ... (microsoft.public.excel.worksheet.functions) - Re: Help Extracting Numbers formula
... Microsoft Excel MVP ... The LEFT function returns the specified number of characters of a string ... starting from the leftmost character. ... then in cell A3, I'd like to multiply 3 and 400. ... (microsoft.public.excel.misc) - Re: Modified VB Code for Converting Number to Text
... >> Microsoft Excel MVP ... >>> Function SpellNumber(ByVal MyNumber) ... >>> Dim Rupees, Paise, Temp ... >>> ' String representation of amount. ... (microsoft.public.excel.programming) |
|