+ Reply to Thread
Results 1 to 6 of 6

Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Israel
    MS-Off Ver
    Winodws 7
    Posts
    4

    Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    I have a file with many sheets, each sheet is relevant to a specific sales person. However, each salesperson always has 2 or more sheets. The sales person name is in cell A1 on every sheet. I am looking for a macro that would cycle through all the tabs in the worksheet and save a new file for each sales employee with their relevant sheet. The file name should be the sales employee's name

    If possible, would also be great to automatically email each file to the relevant salesperson based on a list (or it can also always be in a cell, B1 for instance)

    Many thanks

  2. #2
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    Are there any non-employee sheets (summary sheets etc) in the workbook
    ie any sheets that should not be saved

    just trying to work out is how to eliminate non-employee sheets from this procedure?
    - could A1 be left blank for ALL non-employee sheets?
    - else need a list of the names of any the non-employee sheets names
    thanks

  3. #3
    Registered User
    Join Date
    10-14-2014
    Location
    Israel
    MS-Off Ver
    Winodws 7
    Posts
    4

    Re: Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    Hi,

    There are no additional tabs in the file. All the tabs have a name in A1

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    This should give you what you want.
    -temporary sheet created to collate and sort sheet summary by employee
    -array of sheets by employee created
    -separate file for each employee created containing all sheets for that employee based on values passed from array
    -temporary file delete

    All you need do is
    -include this macro in the employee file
    -amend the emplPath to wherever the files should be saved
    -note that any previous file with same name in that location is overwritten


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-14-2014
    Location
    Israel
    MS-Off Ver
    Winodws 7
    Posts
    4

    Re: Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    Amazing! worked like a charm! Many thanks
    What do I need to add in to send each file to the sales rep automatically. The email address could be located in an adjacent cell, say B1. Would be from an outlook account

  6. #6
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Split Excel sheets to multiple Workbooks based on Criteria in Cell A1

    Please mark this thread as solved and open up new thread for your new question
    You are starting again, so include a full explanation of your problem - do not assume that anyone has read this thread.
    thanks

+ 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. Select a cell at random based on multiple selection criteria across multiple sheets.
    By scottyms in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2016, 09:44 AM
  2. Excel VBA - Split rows of data into multiple workbooks based on cell value
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2015, 03:35 PM
  3. [SOLVED] Split excel data into multiple sheets based on Employee ID
    By Preeti1309 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-21-2014, 02:33 AM
  4. Replies: 1
    Last Post: 04-20-2014, 02:48 PM
  5. [SOLVED] Split workbook into multiple workbooks based on data
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2014, 12:26 AM
  6. Split String From A Cell Based On Multiple Criteria
    By ssanjju in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-05-2013, 03:21 PM
  7. [SOLVED] Split table, based on two criteria, into separate workbooks
    By gingert88 in forum Excel General
    Replies: 6
    Last Post: 07-10-2012, 06: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