Results 1 to 9 of 9

Help with extracting second last number from string

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Help with extracting second last number from string

    Hi

    I have a list of numbers that vary in length and also contain the letter "x" in some of them like this:

    0x60
    1313
    0x41
    x254
    123x
    1
    9x73
    00x9
    522x
    335
    x39x
    34


    And so on. I need to do 3 things:

    1. Extract the last number only if it is a "1". If it is an "x", then I need to extract the second last number.
    2. Extract the last number if it equals 1,2 or 3. If it is an "x", then I need to extract the second last number.
    3. Extract the last number if there is an occurrence of 1 in the last 3. If there is only 1 or 2 numbers in the cell, then look for an occurrence of 1 in these and extract the last number.

    Can anyone assist me with this please?

    Thanks
    Last edited by maym; 12-12-2017 at 08:40 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extracting first number from the right of string
    By hotwax in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-31-2014, 04:01 AM
  2. [SOLVED] Extracting a number from a string
    By cool_anu4u in forum Excel General
    Replies: 1
    Last Post: 10-17-2013, 05:24 AM
  3. [SOLVED] Extracting A Number From A String Of Text
    By @MeDaveT in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-15-2013, 02:57 PM
  4. Replies: 12
    Last Post: 03-20-2013, 05:46 PM
  5. Extracting the nth number from an alphanumeric string
    By Chinchin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2011, 02:38 PM
  6. Extracting a number from a string
    By SgtSunshine in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-25-2010, 07:33 AM
  7. Extracting a number from a string
    By dsexpress in forum Excel General
    Replies: 3
    Last Post: 04-26-2008, 08:41 AM
  8. Extracting a number in a text string
    By Pogo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2006, 01:45 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