extracting numerics from literal strings
Array enter (ctlr+Shift+enter rather than just enter in B1)
=MID(A1,SMALL(IF(ISERROR(MID(A1,ROW(INDIRECT("1:"& LEN(A1))),1)*1),"",ROW(IND
IRECT("1:"&LEN(A1)))),1),LARGE(IF(ISERROR(MID(A1,R OW(INDIRECT("1:"&LEN(A1)))
,1)*1),"",ROW(INDIRECT("1:"&LEN(A1)))),1)-SMALL(IF(ISERROR(MID(A1,ROW(INDIRE
CT("1:"&LEN(A1))),1)*1),"",ROW(INDIRECT("1:"&LEN(A 1)))),1)+1)*1
is one way, but I am sure there is a better way.
--
Regards,
Tom Ogilvy
Ed wrote in message
...
If my cell A1 contains a string such as "Total 30 employees", how do I
extract the value (e.g. 30) from this string and put it in cell B1?
Thanks.
|