#1   Report Post  
Jazzer
 
Posts: n/a
Default A Challenge


Hi,

A little challenge to all of you.

Can you make a worksheet formula (not VBA), that returns the first
numeric value in a text string? ie from a string "quite many (45,
<75)", it would return 45.

- Asser


--
Jazzer
------------------------------------------------------------------------
Jazzer's Profile: http://www.excelforum.com/member.php...fo&userid=4464
View this thread: http://www.excelforum.com/showthread...hreadid=385560

  #2   Report Post  
bj
 
Posts: n/a
Default

For your example with a 2 digit number

=Value(MID(A1,MIN(IF(ISERROR(FIND({0,1,2,3,4,5,6,7 ,8,9},A1)),1000,FIND({0,1,2,3,4,5,6,7,8,9},A1))),2 ))
entered as an array (control-shift-enter)

It gets messy if you don't know how many digits there are.
"Jazzer" wrote:


Hi,

A little challenge to all of you.

Can you make a worksheet formula (not VBA), that returns the first
numeric value in a text string? ie from a string "quite many (45,
<75)", it would return 45.

- Asser


--
Jazzer
------------------------------------------------------------------------
Jazzer's Profile: http://www.excelforum.com/member.php...fo&userid=4464
View this thread: http://www.excelforum.com/showthread...hreadid=385560


  #3   Report Post  
N Harkawat
 
Posts: n/a
Default

=--MID(A1,MATCH(TRUE,ISNUMBER(-MID(A1,Q,1)),0),SUMPRODUCT(--ISNUMBER(-MID(A1,MATCH(TRUE,ISNUMBER(-MID(A1,Q,1)),0),Q))))
array entered (ctrl+shift+enter)

where Q is a named range defined as
=row(indirect("1:"&len(a1)))


"Jazzer" wrote in
message ...

Hi,

A little challenge to all of you.

Can you make a worksheet formula (not VBA), that returns the first
numeric value in a text string? ie from a string "quite many (45,
<75)", it would return 45.

- Asser


--
Jazzer
------------------------------------------------------------------------
Jazzer's Profile:
http://www.excelforum.com/member.php...fo&userid=4464
View this thread: http://www.excelforum.com/showthread...hreadid=385560



  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

bj wrote...
For your example with a 2 digit number

=Value(MID(A1,MIN(IF(ISERROR(FIND({0,1,2,3,4,5,6, 7,8,9},A1)),1000,FIND({0,1,2,3,4,5,6,7,8,9},A1))), 2))
entered as an array (control-shift-enter)

It gets messy if you don't know how many digits there are.

....

It doesn't get all that messy. If the numbers could be any nonnegative
integer up to 15 digits in length (so 0 to 999,999,999,999,999), it
could be done using the normal formula

=IF(MIN(FIND({0;1;2;3;4;5;6;7;8;9},A1&"0123456789" ))<=LEN(A1),
LOOKUP(1E+300,--MID(A1,MIN(FIND({0;1;2;3;4;5;6;7;8;9},
A1&"0123456789")),{1;2;3;4;5;6;7;8;9;10;11;12;13;1 4;15})),"")

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MATCH FUNCTION?...challenge cecilluen Excel Worksheet Functions 3 June 27th 05 09:06 PM
Comparison Challenge Firevic Excel Discussion (Misc queries) 1 June 2nd 05 01:42 AM
Who is up for a challenge? Jambruins Excel Discussion (Misc queries) 2 April 12th 05 08:23 PM
Divide Ranks into two teams (mathematical guru challenge) Theatre Admin Excel Discussion (Misc queries) 4 February 10th 05 02:15 PM
CHALLENGE! - USING IF MAX MIN AND LOOKUP TOGETHER SHAHEED Excel Worksheet Functions 9 December 23rd 04 01:34 AM


All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"