View Single Post
  #5   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


Indeed. The OP should ignore this approach which is a wrong
generalization of a solution for different type of task.

Frank Kabel Wrote:
Hi Aladin
like your non-array formula approach but this version will only work if
the
string contains at least one zero. Otherwise your formula returns for
me
#VALUE. e.g. for
'my dog has 3111 flees'

Also embedded numbers such as 3011 would lead to a wrong result (would
yeald
301 instead of 3011)

"Aladin Akyurek" wrote:



=--REPLACE(LEFT(A2,MAX(FIND(0,SUBSTITUTE(A2,{1,2,3,4, 5,6,7,8,9},0)&0)+1)),1,MIN(FIND(0,SUBSTITUTE(A2,{1 ,2,3,4,5,6,7,8,9},0)&0)-1),"")

where A2 houses a target string with a number.


blackbeemer Wrote:
How do you extract numbers or dates from a string of characters in

a
cell?
I have a string of characters. My dog has 3330 fleas. I want to

place
the
number in its own cell.



--
Aladin Akyurek

------------------------------------------------------------------------
Aladin Akyurek's Profile:

http://www.excelforum.com/member.php...fo&userid=4165
View this thread:

http://www.excelforum.com/showthread...hreadid=277285




--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=277285