Re: Trapping #VALUE! error
- From: "T. Valko" <biffinpitt@xxxxxxxxxxx>
- Date: Tue, 21 Aug 2007 22:13:26 -0400
You're welcome. Thanks for the feedback!
--
Biff
Microsoft Excel MVP
"RhysPieces" <RhysPieces@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C423F75D-F519-41E9-BE98-762BAF54513C@xxxxxxxxxxxxxxxx
The solutions from T. Valko and Peo Sjoblom work equally well. Thanks to
both
for prompt replies.
"T. Valko" wrote:
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.
.
- References:
- Re: Trapping #VALUE! error
- From: T. Valko
- Re: Trapping #VALUE! error
- Prev by Date: Re: How to count the match letter within a string?
- Next by Date: Re: "Locked for Editing" problem in Excel 2007
- Previous by thread: Re: Trapping #VALUE! error
- Next by thread: Re: querry
- Index(es):
Relevant Pages
|