+ Reply to Thread
Results 1 to 9 of 9

Help in extracting specific numbers with expecting digit in different kinds of cell

  1. #1
    Registered User
    Join Date
    01-07-2016
    Location
    Manila
    MS-Off Ver
    2013
    Posts
    6

    Help in extracting specific numbers with expecting digit in different kinds of cell

    Hi

    Need an excel formula that gets the 7 digits ,includes0, on these cells


    Input:

    dsfdsfdsfs434fdfdfdfdf (XX 0076846 / 1508)
    reewrwr XX 0003431 ngfdsfsdfsdfdsfdsfdsfdsfdsfsdfs
    1232 dsadasd 234 2ewq
    start=00062015, end=20062015
    start=00062015, end=20062015 xx 1112233

    Output

    0076846
    0003431
    Nothing found
    Nothing found
    1112233

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    =IFERROR(MID(A1,FIND("XX",UPPER(A1))+3,7),"Nothing found")
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    01-07-2016
    Location
    Manila
    MS-Off Ver
    2013
    Posts
    6

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    Thanks! the code above works

    is there another way to get numbers without relying on the "XX".

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    Probably a User Defined Function (VBA) which looks for 7 digit strings (assuming that there are no other 7 digit strings that you don't want). Not sure it can be done with formulas.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    UDF solution
    Please Login or Register  to view this content.
    It returns the string as a number, not text.
    I use this formula in the cell
    =IF(Num7Digit(A1)=0, "Not Found", Num7Digit(A1))
    Attached Files Attached Files
    Last edited by ChemistB; 01-07-2016 at 10:39 AM.

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

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    I use:

    =MID(A1,MATCH(9,MMULT(ABS(ISNUMBER(0+MID(MID("ζ"&A1&"ζ",ROW(INDEX(A:A,1):INDEX(A:A,LEN(A1)-5)),9),{1,2,3,4,5,6,7,8,9},1))-{1,0,0,0,0,0,0,0,1}),{1;1;1;1;1;1;1;1;1}),0),7)

    for this type of query, though code is obviously less convoluted.

    Regards
    Click * below if this answer helped

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

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    Xor XL,
    Your formula didn't work on my uploaded sheet.

    EDIT: Nevermind, I found my problem. Looks good!

  8. #8
    Registered User
    Join Date
    01-07-2016
    Location
    Manila
    MS-Off Ver
    2013
    Posts
    6

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    Thanks, everyone it worked

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Help in extracting specific numbers with expecting digit in different kinds of cell

    Please Login or Register  to view this content.
    Try this array formula (Confirm with Shift+Ctrl+Enter)
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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. Macro to identify 3-digit and 4-digit numbers as valid dates
    By gojakie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2015, 08:16 AM
  2. Extracting first number from numbers and texts in specific cell
    By macky18 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-25-2014, 08:53 AM
  3. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  4. Extracting a digit from set of numbers
    By [email protected] in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2013, 05:31 AM
  5. [SOLVED] I need to filter numbers separately that ends with a specific digit in the whole column?
    By motivationalist in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-12-2013, 11:35 AM
  6. [SOLVED] macro to extract 9 digit numbers as well as alpha numberic 9 digit numbers from txt file
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2012, 10:15 AM
  7. Replies: 2
    Last Post: 06-17-2010, 08:36 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