+ Reply to Thread
Results 1 to 6 of 6

Searching for a numbers from right within a text string

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    asia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Searching for a numbers from right within a text string

    Hi, I have a list of notes that contain text and numbers within a cell. I need a formula if possible that searches from the right of the cell and then returns the all the numbers.

    e.g.

    1.Inter 2. Juventus 3. R0ma 4.Cagliari formula result 4
    3. Politics;5 National, 7. Biology formula result 7
    19geographic formula result 19

    attachment
    data.xls

    The Result is extract a numbers within text cell from right.
    I can not use text to columns as they data is not consistant.

    Also worth noting is that the notes vary from 1 digit to 9 digits long.

    Any help would be great
    Last edited by don manual; 02-22-2014 at 08:40 PM. Reason: add attachment

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Searching for a numbers from right within a text string

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Searching for a numbers from right within a text string

    Hi,

    Can't do better than this, I'm afraid:

    =LOOKUP(100^100,--MID(A1,LOOKUP(2,1/((1-ISNUMBER(--MID(A1,ROW($1:$1000),1)))*(ISNUMBER(--MID(A1,ROW($2:$1001),1)))),ROW($2:$1001)),ROW($1:$1000)))

    Regards
    Last edited by XOR LX; 02-21-2014 at 06:59 AM.
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    02-21-2014
    Location
    asia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Searching for a numbers from right within a text string

    Quote Originally Posted by XOR LX View Post
    Hi,

    Can't do better than this, I'm afraid:

    =LOOKUP(100^100,--MID(A1,LOOKUP(2,1/((1-ISNUMBER(--MID(A1,ROW($1:$1000),1)))*(ISNUMBER(--MID(A1,ROW($2:$1001),1)))),ROW($2:$1001)),ROW($1:$1000)))

    Regards
    Hi, XOR LX...

    thanks for your formula..
    but in case
    eg
    190.england formula result #N/A result that I want 190

    it's not working if the text cell is just a numbers at the beginning position

    Regards

  5. #5
    Registered User
    Join Date
    02-21-2014
    Location
    asia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Searching for a numbers from right within a text string

    Quote Originally Posted by :) Sixthsense :) View Post
    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    HI, Sixthsense

    I just attached my sample data

    regards..

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Searching for a numbers from right within a text string

    Try this formula for data in A2

    =LOOKUP(10^9,RIGHT(LEFT(A2,MAX(IFERROR(FIND({1,2,3,4,5,6,7,8,9,0},A2),0))),{1,2,3,4,5,6,7,8,9})+0)

    If A2 has no digits the result will be #N/A
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Searching for text in a string
    By Jedski in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-10-2012, 03:44 PM
  2. VBA Vlookup error when searching for all numbers as a string, works fine with letters
    By thumpernc24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 10:06 AM
  3. Searching for text string
    By wit2001large in forum Excel General
    Replies: 6
    Last Post: 02-10-2011, 10:25 AM
  4. Searching for data string in list of numbers
    By Sweetypie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-25-2010, 09:38 PM

Tags for this Thread

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