+ Reply to Thread
Results 1 to 9 of 9

Macro to split data into multiple cells

  1. #1
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Macro to split data into multiple cells

    Hi All,

    I need some help on a macro.
    I have multiple entries in column C which I would like to split it up and show in multiple cells based on Column A& Column B. For example as below

    Original
    Column A Column B Column C
    A 13.05.07 1,2,4,5
    B 15.08.09 9,8,7,6


    Output
    Column A Column B Column C
    A 13.05.07 1
    A 13.05.07 2
    A 13.05.07 4
    A 13.05.07 5

    Any idea anyone able to help me on this? Have attached the sample in tab Sample and how it should be in tab Output.
    Hope someone is able to help me out. :-)

    Kind Regards,
    Mark.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,961

    Re: Macro to split data into multiple cells

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Macro to split data into multiple cells

    Try:
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  4. #4
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to split data into multiple cells

    Quote Originally Posted by alansidman View Post
    Try this:

    Please Login or Register  to view this content.
    Hi Alan,

    This works althought there seems to be some mismatch. For example the first record shows 40 in tab Sample but 43 in tab Output.
    Manually i calculated it should show only 40 records.

    Kind Regards,
    MArk.

  5. #5
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to split data into multiple cells

    Quote Originally Posted by mark888 View Post
    Hi Alan,

    This works althought there seems to be some mismatch. For example the first record shows 40 in tab Sample but 43 in tab Output.
    Manually i calculated it should show only 40 records.

    Kind Regards,
    MArk.
    Hi Alan,
    Sorry i know what went wrong. It calculated the first 3 which I already had there in the first place. :-)

    Kind Regards,
    Mark.

  6. #6
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to split data into multiple cells

    Quote Originally Posted by mark888 View Post
    Hi Alan,

    This works althought there seems to be some mismatch. For example the first record shows 40 in tab Sample but 43 in tab Output.
    Manually i calculated it should show only 40 records.

    Kind Regards,
    MArk.
    Hi Alan,
    Sorry i know what went wrong. It calculated the first 3 which I already had there in the first place. :-)

    Kind Regards,
    Mark.

  7. #7
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to split data into multiple cells

    Quote Originally Posted by millz View Post
    Try:
    Please Login or Register  to view this content.
    Hello Millz,

    This works perfectly as well. Many thanks sir.

    Kind Regards,
    MArk.

  8. #8
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Macro to split data into multiple cells

    try this:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    01-02-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2007
    Posts
    272

    Re: Macro to split data into multiple cells

    Quote Originally Posted by ikboy View Post
    try this:

    Please Login or Register  to view this content.
    Hi Ikboy,

    This works perfectly as well. Many thanks all. :-)

    Kind Regards,
    Mark.

+ 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. MACRO to split new data into multiple tabs but not overwrite existing data
    By amo899115 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-11-2016, 01:42 PM
  2. [SOLVED] Macro attempting to split cells containing multiple co-ordinates into appropriate columns
    By Ethanrholt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-06-2014, 10:56 AM
  3. Macro to split 1 row of data into multiple
    By ks04 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2013, 03:27 AM
  4. [SOLVED] Macro to split cell data across multiple cells based on format-
    By Biased Historian in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 12:57 PM
  5. Macro to split Cells delimter comma to multiple Rows.
    By pavan5183 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2013, 10:24 AM
  6. [SOLVED] How do you split a cell that contains multiple data to the cells beside it?
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2013, 08:37 AM
  7. Split cells long text with Max 40 character to multiple row using Macro
    By chee1012 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2012, 10:10 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