+ Reply to Thread
Results 1 to 7 of 7

macro to split a column every 60 records

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    macro to split a column every 60 records

    Good Morning,

    I have been trying to work on a macro that can take columns A and B from a csv file on my desktop and paste to a new sheet first 60 records in columns A and B and the next 60 records to D and E until there are no more records.

    The purpose to try to save paper and make a better looking file by pasting to two columns instead of one. I just wanted to keep it alphabetical. I made a macro that copied half to A,B and the other half to D,E but it's too confusing.

    Any help on this would be appreciated?

  2. #2
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: macro to split a column every 60 records

    it won't let me post a csv file. Does anyone know why?

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: macro to split a column every 60 records

    anyone have any suggestions on this macro?

  4. #4
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: macro to split a column every 60 records

    See if this works. You'll need to edit the code where shown to specify your csv file name.
    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

  5. #5
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: macro to split a column every 60 records

    That's pretty close. Except it paste all the copies side by side. I was hoping it would paste 60 record columns A & B then 60 records to D&E. Then paste in A&B then 60 to D&E and keep going back and forth to the end. I also didn't get any date's in the 2nd column. I really appreciate the help on this. Thanks.
    Last edited by carden2; 10-02-2012 at 02:37 PM.

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: macro to split a column every 60 records

    Anyone have any ideas how to modify Chippys code?

    It's really close it pastes in AB then CD then EF instead of back to AB column then DE column

    I was hoping to get it to paste AB then DE then AB then DE and keep going til there are no more records in the csv file. I also couldn't get the date values to paste when I tried it.

  7. #7
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: macro to split a column every 60 records

    Sorry for slightly misunderstanding your requirement. This should do what you want:
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-18-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: macro to split a column every 60 records

    This works quite well. Is there a way to make it copy column A & B from the CSV file? Thanks.

+ 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