+ Reply to Thread
Results 1 to 9 of 9

Extract number in middle of cell

  1. #1
    Jason Morin
    Guest

    RE: Extract number in middle of cell

    Given your examples, you could use:

    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)*1

    Test it on several other examples. It may fail if your other examples don't
    follow a similar pattern.

    HTH
    Jason
    Atlanta, GA

    "SCOOBYDOO" wrote:

    > Hi, does anyone know how I extract a number if it appears in the middle of a
    > cell but not necessarily at the same point in i.e. 'buy 35 products', 'sell
    > 40 products'. Thanks in anticipation ; )


  2. #2
    N Harkawat
    Guest

    Re: Extract number in middle of cell

    =--MID(A1,FIND(" ",A1)+1,FIND("^",SUBSTITUTE(A1," ","^",2))-FIND(" ",A1)-1)
    provided your cell always contains text then a space then number and then a
    space

    "SCOOBYDOO" <[email protected]> wrote in message
    news:[email protected]...
    > Hi, does anyone know how I extract a number if it appears in the middle of
    > a
    > cell but not necessarily at the same point in i.e. 'buy 35 products',
    > 'sell
    > 40 products'. Thanks in anticipation ; )




  3. #3
    Jason Morin
    Guest

    RE: Extract number in middle of cell

    Given your examples, you could use:

    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)*1

    Test it on several other examples. It may fail if your other examples don't
    follow a similar pattern.

    HTH
    Jason
    Atlanta, GA

    "SCOOBYDOO" wrote:

    > Hi, does anyone know how I extract a number if it appears in the middle of a
    > cell but not necessarily at the same point in i.e. 'buy 35 products', 'sell
    > 40 products'. Thanks in anticipation ; )


  4. #4
    N Harkawat
    Guest

    Re: Extract number in middle of cell

    =--MID(A1,FIND(" ",A1)+1,FIND("^",SUBSTITUTE(A1," ","^",2))-FIND(" ",A1)-1)
    provided your cell always contains text then a space then number and then a
    space

    "SCOOBYDOO" <[email protected]> wrote in message
    news:[email protected]...
    > Hi, does anyone know how I extract a number if it appears in the middle of
    > a
    > cell but not necessarily at the same point in i.e. 'buy 35 products',
    > 'sell
    > 40 products'. Thanks in anticipation ; )




  5. #5
    Jason Morin
    Guest

    RE: Extract number in middle of cell

    Given your examples, you could use:

    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)*1

    Test it on several other examples. It may fail if your other examples don't
    follow a similar pattern.

    HTH
    Jason
    Atlanta, GA

    "SCOOBYDOO" wrote:

    > Hi, does anyone know how I extract a number if it appears in the middle of a
    > cell but not necessarily at the same point in i.e. 'buy 35 products', 'sell
    > 40 products'. Thanks in anticipation ; )


  6. #6
    N Harkawat
    Guest

    Re: Extract number in middle of cell

    =--MID(A1,FIND(" ",A1)+1,FIND("^",SUBSTITUTE(A1," ","^",2))-FIND(" ",A1)-1)
    provided your cell always contains text then a space then number and then a
    space

    "SCOOBYDOO" <[email protected]> wrote in message
    news:[email protected]...
    > Hi, does anyone know how I extract a number if it appears in the middle of
    > a
    > cell but not necessarily at the same point in i.e. 'buy 35 products',
    > 'sell
    > 40 products'. Thanks in anticipation ; )




  7. #7
    SCOOBYDOO
    Guest

    Extract number in middle of cell

    Hi, does anyone know how I extract a number if it appears in the middle of a
    cell but not necessarily at the same point in i.e. 'buy 35 products', 'sell
    40 products'. Thanks in anticipation ; )

  8. #8
    Jason Morin
    Guest

    RE: Extract number in middle of cell

    Given your examples, you could use:

    =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1)*1

    Test it on several other examples. It may fail if your other examples don't
    follow a similar pattern.

    HTH
    Jason
    Atlanta, GA

    "SCOOBYDOO" wrote:

    > Hi, does anyone know how I extract a number if it appears in the middle of a
    > cell but not necessarily at the same point in i.e. 'buy 35 products', 'sell
    > 40 products'. Thanks in anticipation ; )


  9. #9
    N Harkawat
    Guest

    Re: Extract number in middle of cell

    =--MID(A1,FIND(" ",A1)+1,FIND("^",SUBSTITUTE(A1," ","^",2))-FIND(" ",A1)-1)
    provided your cell always contains text then a space then number and then a
    space

    "SCOOBYDOO" <[email protected]> wrote in message
    news:[email protected]...
    > Hi, does anyone know how I extract a number if it appears in the middle of
    > a
    > cell but not necessarily at the same point in i.e. 'buy 35 products',
    > 'sell
    > 40 products'. Thanks in anticipation ; )




+ 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