+ Reply to Thread
Results 1 to 6 of 6

Split single column into multiple columns based on value

  1. #1
    Registered User
    Join Date
    07-12-2018
    Location
    United States
    MS-Off Ver
    2013
    Posts
    2

    Split single column into multiple columns based on value

    Dear VBA experts,

    I have a lengthy single column with data sets separated by empty cells like this:

    275
    284
    288
    286
    269

    232
    215
    201
    186

    146
    132
    112

    How can I move each dataset to its own column so that it looks like:
    275 232 146
    284 215 132
    288 201 112
    286 186
    269

    I am new to VBA and have hunted around unsuccessfully for a way to do this. Thank you in advance for any help you can provide.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Split single column into multiple columns based on value

    Hi _Raven_

    Welcome to the forum...
    Here's one way...
    Please Login or Register  to view this content.
    Last edited by sintek; 07-12-2018 at 01:10 PM. Reason: Added snippet of code
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Split single column into multiple columns based on value

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  4. #4
    Registered User
    Join Date
    07-12-2018
    Location
    United States
    MS-Off Ver
    2013
    Posts
    2

    Re: Split single column into multiple columns based on value

    Thanks so much, sintek. This worked perfectly.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Split single column into multiple columns based on value

    ......................................
    Thanks.gif

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Split single column into multiple columns based on value

    For the fun another way
    Yes.... very similar to YasserKhalil 's one !!
    Please Login or Register  to view this content.
    Last edited by PCI; 07-12-2018 at 03:32 PM.
    - Battle without fear gives no glory - Just try

+ 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. Split Single Row into multiple rows based on column data
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2017, 01:57 PM
  2. Split Column into Multiple Columns Based Off Specific Criteria
    By hellzone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2017, 09:49 PM
  3. [SOLVED] Merge multiple columns into single column based on ID
    By sqlnoob in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 01:22 PM
  4. split single spreadsheet into multiple workbooks based on value in column D
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2014, 07:27 PM
  5. [SOLVED] Sorting data into multiple columns based on a single column
    By J.McQ in forum Excel General
    Replies: 7
    Last Post: 03-16-2013, 11:26 AM
  6. [SOLVED] Need macro to split one column into multiple columns based on _ and spacing
    By snely in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-17-2012, 10:05 AM
  7. [SOLVED] Arbitrary points: Split single column into multiple columns
    By ChasingShadows in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2012, 11:08 PM

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