|
| converting text mixed w/data into 1 data cell |
 |
Fri, 01 Feb 2008 14:43:34 -070 |
I need to convert a cell with the value "J149" into just the numeric
value "149". Is there an @ function that will accomplish this?
|
| Post Reply
|
| Re: converting text mixed w/data into 1 data cell |
 |
Fri, 01 Feb 2008 22:53:30 GMT |
Chris:
> I need to convert a cell with the value "J149" into just the
numeric
> value "149". Is there an @ function that will accomplish this?
>
Well, yes, but . . .
In this exact case, with B7: J149, either of these does the trick:
@MID(B7,1,20)
@RIGHT(B7,3)
Note that the result of the operation is a string value,
unless you elaborate to e.g:
@VALUE(@MID(B7,1,20))
and that neither formula will cope with AB149.
This copes with J149 and AB149 (beware wordwrap):
@IF(@ISERR(@VALUE(@MID(B7,1,20))),@VALUE(@MID(B7,2,20)),@VALUE(@MID(B7,1,20)))
(though it does not like B7: ABC)
and can be extended to cope with ABC149. A better device would be preferable.
That needs a better author.
--
Good wishes!
Roy Lewis
C_Tech volunteer
(UK)
|
| Post Reply
|
|
|
|
|
|
|
|
|
|