+ Reply to Thread
Results 1 to 8 of 8

Extracting two separate numbers from one cell

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    18

    Extracting two separate numbers from one cell

    Hi all

    I would really appreciate your help on a little issue I have not been able to solve despite extensive google'ing

    I have the below text in one column (each line has its own cell/row) and I would like to extract the digits following "SKU" to one column and the digits before "æsker" to the next column. It would be great if it could be done with a formula so I can easily add to my list later on.

    SKU10013.IT – 103 æsker
    SKU11841.IT – 32 æsker
    SKU10031.IT – 64 æsker
    SKU11025.IT – 16 æsker
    SKU11035.IT – 16 æsker
    SKU10021.IT – 80 æsker

    Two notes:
    1) First number can vary between 5-6 digits
    2) Second number can vary between 1-3 digits


    I have found plenty of suggestions on how to do this for one number but none for extracting two separate numbers so really hope someone here can help.

    Thanks a lot
    Last edited by Dennis Foldager; 11-12-2015 at 11:45 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,799

    Re: Extracting two separate numbers from one cell

    Please post a small sample workbook. I have tried to recreate your sample, but I suspect that the characters on your software are different from mine and a standard =find is failing. It would be helpful to see actual data in a spreadsheet.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-07-2013
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    18

    Re: Extracting two separate numbers from one cell

    Sure thing! Here is a small sample

    Sample2.xlsx

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extracting two separate numbers from one cell

    I have found these two formulas to work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I don't have the long dash on my keyboard so I've used the Character code to find.

    *Hadn't seen your sample file when replying. The above work on my pc with the values copied from your first post, however, they fail with the sample.

    DBY
    Last edited by DBY; 11-12-2015 at 11:26 AM.

  5. #5
    Registered User
    Join Date
    01-07-2013
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    18

    Re: Extracting two separate numbers from one cell

    Thanks DBY!

    First formula works great! With the second formula I still get the first letter from the last word in cases where there is only one digit. Any idea on how to fix that?

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extracting two separate numbers from one cell

    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I'm having to use the character code again for 'aesker'.

  7. #7
    Registered User
    Join Date
    01-07-2013
    Location
    Denmark
    MS-Off Ver
    Office 365 ProPlus
    Posts
    18

    Re: Extracting two separate numbers from one cell

    Perfect! That did the trick!

    Sorry about my weird Danish keyboard

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Extracting two separate numbers from one cell

    Glad we could help. I am assuming that the SKU until the dash are always the same length, as I've hard coded the 15. If not you're going to have to use FIND again - on the dash perhaps.

+ 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. Replies: 8
    Last Post: 05-20-2015, 10:25 AM
  2. [SOLVED] Extracting numbers from a cell of 8 or more
    By Matty5894 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-27-2015, 06:59 AM
  3. Replies: 2
    Last Post: 02-25-2015, 08:26 PM
  4. [SOLVED] Extracting numbers only from a cell
    By warston in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-19-2013, 01:51 PM
  5. Extracting all numbers from a cell?
    By Shelter417 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2012, 11:33 AM
  6. Replies: 2
    Last Post: 05-10-2010, 03:17 PM
  7. Extracting numbers from a cell
    By morchard in forum Excel General
    Replies: 2
    Last Post: 06-30-2005, 06:05 AM

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