+ Reply to Thread
Results 1 to 2 of 2

Extracting Numeric data from a string

  1. #1
    Registered User
    Join Date
    07-30-2007
    Posts
    61

    Question Extracting Numeric data from a string

    Hi

    Please could someone help me with the following?

    I need to extract numeric data only from strings that are mixed up with both numeric and alphanumeric data.

    For example

    Column A
    8yrs 1month
    10yrs 10months
    1yr 1month
    1yr 10months

    I would like to get the following in two separate columns

    Column B
    8
    10
    1
    1

    Column C
    1
    10
    1
    10



    Thanks

    Roast

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    In column B,

    =LEFT(A1,FIND("y",A1)-1)

    In column C


    =MID(A1,FIND(" ",A1)+1,FIND("m",A1)-FIND(" ",A1)-1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

+ 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. Extracting data from the offset of a cell, to be put into a new sheet
    By michaelkwc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2008, 07:08 AM
  2. Extracting data from one massive worksheet to split to smaller sheets of data
    By michaelkwc in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-21-2008, 06:35 AM
  3. Various macro issues linked to DDE
    By JMann in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2008, 08:08 AM
  4. extracting data from a filtered data base
    By Camelhump in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-06-2008, 03:22 PM
  5. Changing VBA code to return data range, appending to prior data
    By camcrazy08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2007, 10:53 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