+ Reply to Thread
Results 1 to 6 of 6

Extract last numbers in a column of varying lengths/formats

  1. #1
    Registered User
    Join Date
    10-25-2017
    Location
    United States
    MS-Off Ver
    2019
    Posts
    77

    Extract last numbers in a column of varying lengths/formats

    I am looking to refine my current formula that extracts all digits from the values in column A. The values varying in length and format, but I want to just refine the formula I currently have.

    current formula in column B:
    Please Login or Register  to view this content.
    Desired result in Column C:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,275

    Re: Extract last numbers in a column of varying lengths/formats

    Try this:
    Please Login or Register  to view this content.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.97 for Mac MS 365
    Posts
    8,700

    Re: Extract last numbers in a column of varying lengths/formats

    this should work for you (at least in column C)...
    =SUBSTITUTE(MID(B2,SEARCH("-",B2),99),"-","")

    (I interpreted what you wanted from the desired results column.)
    Last edited by Sam Capricci; 04-06-2018 at 11:09 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Extract last numbers in a column of varying lengths/formats

    Try this in C2:

    =MID(B2,FIND("-",B2)+1,LEN(B2))+0

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,275

    Re: Extract last numbers in a column of varying lengths/formats

    I was basing mine on the OP's opening gambit:

    I am looking to refine my current formula ...

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,275

    Re: Extract last numbers in a column of varying lengths/formats

    Oh, dear - I think someone needs to re-read the forum rules (and those of the other forum where he has asked the same question).

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.

    However, it looks like it's been solved elsewhere ...

+ 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 all numbers from cells with varying lengths
    By Stuepef in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-04-2018, 02:47 AM
  2. Need to extract specific but varying length and location numbers from description
    By 5bigun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2016, 10:39 AM
  3. [SOLVED] Need a macro to sum or subtotal ranges of varying lengths in a column
    By zookeepertx in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 05-12-2014, 06:14 AM
  4. [SOLVED] Extract numbers of variable lengths from cell
    By Nizz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-18-2013, 10:11 AM
  5. Replies: 3
    Last Post: 05-09-2012, 11:36 AM
  6. Replies: 2
    Last Post: 09-20-2010, 05:55 AM
  7. Fill down formula using VBA to varying column lengths
    By Lee Jeffery in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 01-28-2005, 08:40 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