+ Reply to Thread
Results 1 to 37 of 37

A Challenge

  1. #1
    Forum Contributor
    Join Date
    01-05-2004
    Location
    Helsinki, Finland
    Posts
    100

    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

  2. #2
    bj
    Guest

    RE: A Challenge

    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. #3
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #4
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  5. #5
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  6. #6
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  7. #7
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  8. #8
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  9. #9
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  10. #10
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  11. #11
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  12. #12
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  13. #13
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  14. #14
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  15. #15
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  16. #16
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  17. #17
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  18. #18
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  19. #19
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  20. #20
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  21. #21
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  22. #22
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  23. #23
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  24. #24
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  25. #25
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  26. #26
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  27. #27
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  28. #28
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  29. #29
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  30. #30
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  31. #31
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  32. #32
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  33. #33
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  34. #34
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


  35. #35
    bj
    Guest

    RE: A Challenge

    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
    >
    >


  36. #36
    N Harkawat
    Guest

    Re: A Challenge

    =--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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  37. #37
    Harlan Grove
    Guest

    Re: A Challenge

    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;14;15})),"")


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1