+ Reply to Thread
Results 1 to 8 of 8

Unable to split text and numbers into Separate Cells that have no space

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    48

    Unable to split text and numbers into Separate Cells that have no space

    Good Morning!

    I have been searching for a method to split cells that have text and numbers combined with no spaces between them. I have a sheet that has a column of codes, with varying lengths of text, that I need to split into a column of text and column of Numbers.

    I have attached a very basic spreadsheet to explain what I am trying to do.

    After I select get the text and numbers separated, I need to pull the last 3 digits (from the Left) and the 4th-7th digits (from the left) into their own columns.

    The cells look something like this: They are originally located in column C2:C800.

    EANENE10316080
    EANENE10316080
    EANENE10316080
    EANENE10316080
    EANENE10316080
    EANENE10322083
    EANENE10322083
    DPDPDP00265081

    I would like it to look like this (example cell: EANENE10316080)

    D1 E1 F1

    EANENE 080 10316


    I have used the following code to pull the number out: but, I can't figure out how to pull the text out:

    Please Login or Register  to view this content.

    Any help would be greatly appreciated! Thank you in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Unable to split text and numbers into Separate Cells that have no space

    Could use use text-to-columns under Data ribbon, and use Fixed Width... if it's always a 6-5-3 split.
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Unable to split text and numbers into Separate Cells that have no space

    If it's always that way.

    See the file for the formula's

    b1
    Please Login or Register  to view this content.
    c1
    Please Login or Register  to view this content.
    d1
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by oeldere; 01-21-2013 at 02:14 PM.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    07-18-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Unable to split text and numbers into Separate Cells that have no space

    Thank you for the quick reply. The text length can vary from 5-8 characters. I apologize that I did not put that in my original post. That makes it more challenging to use the text to columns.

    Any other direction to pursue would be greatly appreciated.

    Thank you again!

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Unable to split text and numbers into Separate Cells that have no space

    Since you indicated that the text length can be variable...
    Using your posted workbook...

    The numeric component:
    Please Login or Register  to view this content.
    the text values:
    Please Login or Register  to view this content.
    The last 3 digits
    Please Login or Register  to view this content.
    The digits preceding the last 3 digits
    Please Login or Register  to view this content.
    Copy those formulas down through Row_9

    These will be the results:
    Please Login or Register  to view this content.
    Note: the Col_C values have many trailing spaces.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  6. #6
    Registered User
    Join Date
    07-18-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Unable to split text and numbers into Separate Cells that have no space

    Ron,

    Thank you very much! I really appreciate the help! That is exactly what I needed!

    Thank you again for the quick reply!

    Have a great day!

  7. #7
    Registered User
    Join Date
    07-18-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Unable to split text and numbers into Separate Cells that have no space

    Ron,

    If you don't mind... and you have a moment, I have not figured out all of the 'functions' and how to use them most appropriately. What was the purpose of using TRIM in your following code and your subsequent codes?
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Thanks again. Really appreciate your help.

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Unable to split text and numbers into Separate Cells that have no space

    I think I can best describe the TRIM function with an example:
    Please Login or Register  to view this content.
    I hope that helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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