+ Reply to Thread
Results 1 to 5 of 5

Extract from the last number with an alphanumeric value.

  1. #1
    Forum Contributor
    Join Date
    03-06-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    2007, 2010
    Posts
    127

    Extract from the last number with an alphanumeric value.

    This might be more appropriate for a VBA thread, but I'd thought I start here. I need to extract all characters to the right of the last number of an alphanumeric value in a cell. This will exclude any spaces that may start at the beginning.

    Here's an example:

    HTML Code: 
    The last number is "0" so....it would result in:

    HTML Code: 
    BrownBoy

    If happy, mark "SOVLED" & add to "REP"

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Extract from the last number with an alphanumeric value.

    Pretty sure someone who is more experienced can come with formula solution. But for VBA, maybe created an UDF.

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Extract from the last number with an alphanumeric value.

    =trim(mid(a1,lookup(2,1/isnumber(--mid(a1,row(1:256),1)),row(1:256))+1,256))
    try this if you have data in cell a1
    Samba

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

  4. #4
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Extract from the last number with an alphanumeric value.

    This may work also, assuming no other "." exist in your data:

    Please Login or Register  to view this content.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  5. #5
    Forum Contributor
    Join Date
    03-06-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    2007, 2010
    Posts
    127

    Re: Extract from the last number with an alphanumeric value.

    nflsales,

    That worked. Thanks. The UDF did not (thanks anyways) and mcmahobt, smart thinking using the decimal.

+ 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: 2
    Last Post: 11-27-2013, 10:52 AM
  2. How do I extract a number from an alphanumeric string?
    By paulh09 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-16-2012, 09:44 AM
  3. [SOLVED] Extract number that comes before a certain word in an alphanumeric cell
    By Pearla in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-27-2012, 07:13 PM
  4. Extract number from alphanumeric string
    By laichiwai in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-12-2010, 01:40 AM
  5. Extract number from alphanumeric string
    By shiner99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-16-2008, 03:30 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