+ Reply to Thread
Results 1 to 5 of 5

Extract first number in a string, and the three letters after the first number

  1. #1
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    83

    Extract first number in a string, and the three letters after the first number

    I have some strings such as "28,456.0324 ADA-9F4", which contain all start with a number followed by some characters and maybe additional numbers. I would like to extract the first number, and also extract the first three letters which follow the first number. So in the string mentioned above the outpuit of the two formulas would be "28'456.0324" and "ADA".

    I already searched around, and found an extremely long formula to extract a number, but that didn't work as it was designed to turn all numbers in the string into one big number, and effectively ignored the decimal point.

    An example spreadsheet is attached with the desired outcome shown in yellow.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,411

    Re: Extract first number in a string, and the three letters after the first number

    I assume the apostrophe ( ' ) towards the end of your second sentence is a mis-type.

    Pete

  3. #3
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    83

    Re: Extract first number in a string, and the three letters after the first number

    Quote Originally Posted by Pete_UK View Post
    I assume the apostrophe ( ' ) towards the end of your second sentence is a mis-type.

    Pete
    Actually not a mistype. Here in Europe, especially in finance, we use an apostrophe as the thousands separator, rather than a comma. Excel number formatting is set up that way for us by default. However, lets ignore the formatting which I can do. I just want the number to come out as 28456.0324.

    The reason we use an apostrophe instead of the old-fashioned Anglo-Saxon comma that we learned in school has to do with the French. In France, the comma is used in place of the full stop in numbers. So whereas the Anglo Saxons would write 123.456 the French would write 123,456. It looks like a completely different number. So to avoid confusion in Europe, the apostrophe is commonly used as the thousands separator instead of a comma, especially in Excel.

    Of course the brits are no longer in the EU, so I suppose the comma will prevail there.
    Last edited by TRICKYT57; 07-17-2021 at 06:00 PM.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,252

    Re: Extract first number in a string, and the three letters after the first number

    Hi,

    See the attached with two formulas you want.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    extract first number and the 3 letters follwoing first number for Tricky.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Extract first number in a string, and the three letters after the first number

    at B3
    =MID(A3,FIND(" ",A3)+1,3)
    at C3
    =LEFT(A3,FIND(" ",A3))
    copy down

+ 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. [SOLVED] extract number from string..with letters.
    By keith81591 in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 08-13-2018, 09:48 AM
  2. [SOLVED] Removing varied number of letters from end of number-letter string
    By WhiskeyGolf in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 04-16-2015, 04:43 AM
  3. Convert a string of letters to a number
    By niki_cboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-29-2012, 01:25 AM
  4. [SOLVED] Extract letters before first number
    By j.lancaster1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2012, 08:49 PM
  5. [SOLVED] How to extract Fist number, Last number from string and SUM
    By Xiaojiang in forum Excel General
    Replies: 5
    Last Post: 05-07-2012, 01:39 AM
  6. Converting string of letters to Number
    By sebkavam in forum Excel General
    Replies: 6
    Last Post: 07-26-2006, 05:55 PM
  7. Extract number from text/number string..
    By nastech in forum Excel General
    Replies: 5
    Last Post: 07-05-2006, 06:25 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