+ Reply to Thread
Results 1 to 9 of 9

Split up contents of cell

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    63

    Split up contents of cell

    Hi

    If Cell A1 Contained 1,154,546,487,47,36,48,47,668 and so on. Using a Formula or Macro how can I get it to take each number(s) before each comma and put it in the next column on the same row?

    So using the above example numbers you would end up with 1 in column A1 and 154 in column B2 and so on and so forth.


    Thanks

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Split up contents of cell

    Have you tried Text to Columns with comma delimiter?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Split up contents of cell

    Hi,

    =TRIM(MID(SUBSTITUTE($A1,",",REPT(" ",41)),41*(COLUMNS($A:A)-1)+1,41))

    Copy to the right as required.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Registered User
    Join Date
    02-06-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Split up contents of cell

    Hi both

    Thank you for your replies

    sktneer- I have done the text to Columns with comma delimiter however I wanted a formula to do this if possible as I am constantly updating same spread sheet.

    XOR LX - I used your formula but it only takes the 1st number before the comma and puts it in the next sell but does not do the same with the rest.

    Thanks guys for your help

  5. #5
    Registered User
    Join Date
    02-06-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Split up contents of cell

    So I start with


    Column A
    12,23,3453

    And end up with...

    [table style="width:300px"]
    [tr]
    [td]Column A [/td]
    [td]Column B [/td]
    [td]Column C [/td]
    [/t]
    [tr]
    [td]12[/td]
    [td]23[/td]
    [td]3453[/td]
    [/tr]

    [/table]
    Last edited by Chantal4130; 05-02-2014 at 08:45 AM.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Split up contents of cell

    Try this code........
    Please Login or Register  to view this content.

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Split up contents of cell

    Quote Originally Posted by Chantal4130 View Post
    XOR LX - I used your formula but it only takes the 1st number before the comma and puts it in the next sell but does not do the same with the rest.
    Can you post a workbook with your attempt at applying my formula in?

    Regards

  8. #8
    Registered User
    Join Date
    02-06-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    63

    Re: Split up contents of cell

    sorry XOR LX you were correct

    I just needed to repeat across to the right as you stated.

    My bad

    Thank you for your help

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Split up contents of cell

    You're welcome.

+ 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] split the cell contents
    By baishi in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-10-2012, 05:05 PM
  2. split cell contents
    By bone7890 in forum Excel General
    Replies: 2
    Last Post: 05-18-2012, 04:36 AM
  3. Split cell contents over multiple rows based on cell contents
    By naigy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2011, 05:38 PM
  4. Split contents of cell
    By Lynneth in forum Excel General
    Replies: 3
    Last Post: 04-12-2010, 05:38 AM
  5. split cell contents
    By DaveRust in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-04-2010, 11:51 AM

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