+ Reply to Thread
Results 1 to 4 of 4

extract numbers from string

  1. #1
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    extract numbers from string

    I want to extract numbers from string.

    Example tyouy890ty --> I want output = 890

    Please guide me about it.
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: extract numbers from string

    A very common request, with just as many ways to do it - VBA or Formulas.

    For example: https://www.educba.com/extract-number-from-string/

    Or look at the 'Similar Threads' list below

  3. #3
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: extract numbers from string

    I have the below saved as my preferable way to do it without having to add any references to the VBE:
    Please Login or Register  to view this content.
    The above will include characters like: *+,-./

    If you wanted to remove those '*+,-./' then you could use
    Please Login or Register  to view this content.
    The below is a reference as to what characters are being kept/ removed:
    https://docs.microsoft.com/en-us/off...acter-set-0127
    If things don't change they stay the same

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: extract numbers from string

    If Textjoin function is available
    ARRAY formula
    =TEXTJOIN("",TRUE,IF(ISNUMBER(FIND(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),"0123456789")),MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1),""))
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Extract all numbers from string, returning numbers to individual cells
    By LJBOS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2020, 08:46 AM
  2. Extract numbers from string
    By porepiga in forum Excel General
    Replies: 2
    Last Post: 10-30-2018, 01:39 PM
  3. Extract Numbers from String
    By mattneil41 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2017, 05:48 AM
  4. [SOLVED] Extract Numbers from String
    By SanchoPanza1 in forum Excel General
    Replies: 8
    Last Post: 01-24-2017, 04:28 PM
  5. Extract numbers from a string
    By Nighteg in forum Excel General
    Replies: 5
    Last Post: 11-03-2016, 09:35 AM
  6. Extract numbers from a string
    By mkhan123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-03-2011, 03:22 PM
  7. [SOLVED] Extract numbers from a string ?
    By Jello in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-03-2005, 07:06 PM

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