+ Reply to Thread
Results 1 to 8 of 8

How to split Excel into different files based on a column?

  1. #1
    Registered User
    Join Date
    11-06-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    57

    How to split Excel into different files based on a column?

    Hi, I'm looking to split the file based on the "degree" / B column.
    The result would be each file will have all the schools with the same "degree" column.

    Example:
    File 1 = Degree 1 with all schools with degree 1
    File 2 = Degree 2 with all schools with degree 2

    Here's a screenshot of the file.
    excelsplit.png

    Sample workbook:excelsplit.xlsx

    Any idea how we can do this?
    Last edited by stan255; 11-09-2015 at 06:00 AM.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,370

    Re: How to split Excel into different files based on a column?

    Hi stan255,
    try this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-06-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    57

    Re: How to split Excel into different files based on a column?

    Thanks nilem! It looks like its working.
    How do you change where the files will be located? It would be pretty bad if there are 1,000 files on the desktop.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,370

    Re: How to split Excel into different files based on a column?

    change this line
    Please Login or Register  to view this content.
    to something like
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-06-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    57

    Re: How to split Excel into different files based on a column?

    I just found out something, the VBA only splits the file up to degree 5.
    In the file, there are up to degree 9 like school 2 have degree 1,2,3,4,5,6,7,8,9 and school 3 have degree 1,2,3,4,5,6,7

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,370

    Re: How to split Excel into different files based on a column?

    Oops, sorry
    change this line (instead of x(i,1))
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-06-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    57

    Re: How to split Excel into different files based on a column?

    Excellent! Thanks so much for the help, nilem! +rep

    Edit: I got 1 last question, how do you make the split files to be in CSV format? Right now, all the split files are in xlsx.
    My import software has problems importing xlsx files
    Last edited by stan255; 11-09-2015 at 07:36 PM.

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,370

    Re: How to split Excel into different files based on a column?

    try to change this part
    Please Login or Register  to view this content.

+ 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 one Excel file into multiple files based on values in column A?
    By MetroBOS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2015, 10:59 AM
  2. Replies: 3
    Last Post: 06-23-2015, 03:58 PM
  3. [SOLVED] How to Split Excel Spreadsheets into new .xls files based on their cell names?
    By Ardiko in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-02-2013, 02:22 PM
  4. split text files stored in some location to multiple files based on a condition
    By GIRISH_KH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2013, 11:32 AM
  5. Split Excel into Multiple csv files based upon the sum of column count.
    By sukanya123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-02-2013, 07:28 PM
  6. Split Excel file into multiple files based on number of rows
    By kingtut86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2013, 03:38 PM
  7. Replies: 3
    Last Post: 08-02-2006, 12:35 PM

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