+ Reply to Thread
Results 1 to 10 of 10

Macro Code for Splitting one sheet data into multiples sheets

  1. #1
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Macro Code for Splitting one sheet data into multiples sheets

    I have one concern that I have to split one sheet data into multiples sheets.

    Based on condition as below.

    Main Sheet:"Employeedata"

    Columns : Employee Name , Date, Working Hour, Rate, Total.("A:E")

    Main Sheet consists of Employee details of all the workshop .

    I need to split the Main "Employeedata" Sheet into separate sheet for each of the Individual Employee based on name.

    and also when i add detail in "Employeedata" sheett ,automaticly append in perticular employee sheet

    if I add new employee excel automaticly create new sheet with employee name

    Would appreciate if any body can provide such macro code.

    Thanks in advance

    Regards,

    hkbhansali
    My English is very poor, so please be patient >_<"

    Thanks & Regards.
    hkbhansali

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Hello Hkbhansali,

    You could try the following code in a standard module assigned to a button:-


    Please Login or Register  to view this content.
    The code will create a sheet for each individual named in Column A and then transfer each row of data for each individual to the respective sheet.

    I've attached my test work book for you to peruse. Click on the "RUN" button to see it work.

    I hope that this helps.

    Cheerio,
    vcoolio.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Thanks vcoolio
    Your code is working fine but when i input new data in Main Sheet:"Employeedata" (deleting old data i.e. yesterday's data) and input today's data
    then individual employee sheet ADD new data keeping old data as it is.

    is it possible?

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Hello Hkbhansali,

    Could you please explain more clearly what you would like to do.

    Are you saying that you delete old data from the Main Sheet once you input new data and that the previously transferred data (older data) to the individual sheets needs to remain in the individual sheets with the newest data added to the bottom of existing data in the individual sheets??

    Cheerio,
    vcoolio.

  5. #5
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Exactly yes, that I am expecting.

  6. #6
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Hello Hkbhansali,

    Perhaps the following modified version of the code will do the task for you:-


    Please Login or Register  to view this content.
    This code also clears the data from the Main Sheet except for the employee name once the data transfer is complete. This way, you can add new data for each employee without typing in his/her name again. All older data will remain in each individual sheet.

    I've attached my updated test work book for you.

    Cheerio,
    vcoolio.

    P.S.: BTW, you've been around the forums long enough to know how we feel about cross posting without notification:-

    http://ccm.net/forum/affich-938899-a...multiple-sheet

    Please bear this in mind in future. I'll make note over at CCM or even delete the post from there.
    Attached Files Attached Files
    Last edited by vcoolio; 11-14-2016 at 03:23 AM. Reason: Add P.S.

  7. #7
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Thanks vcoolio,
    Hats of you
    Perfect...
    but little modification require
    column "A" also clear from Main sheet, because employee are changing.
    and Individual Employe Sheet Start with his Name.

    I've attached my modified test work book for you.
    Attached Files Attached Files
    Last edited by hkbhansali; 11-14-2016 at 04:30 AM.

  8. #8
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Hello Hkbhansali,

    To do this, in the code, just change the B2 in these two lines of code :-

    Please Login or Register  to view this content.
    to A2.

    Cheerio,
    vcoolio.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    12-21-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    387

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Thanks a lot vcoolio,

    Thanks for removing the word EXPECTATION and adding the world HAPPINESS to the dictionary of our friendship.

    hkbhansali

  10. #10
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro Code for Splitting one sheet data into multiples sheets

    Glad that I could help HKB.

    Cheerio,
    vcoolio.

+ 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. Replies: 2
    Last Post: 09-16-2015, 07:59 AM
  2. [SOLVED] Copy Multiples Sheets to One Sheet by Criteria in Column (in All sheets)
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-13-2014, 08:36 PM
  3. [SOLVED] Splitting Sheet into two Sheets using macro
    By Tmc2159 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-17-2013, 10:30 AM
  4. Splitting Data from 1 Sheet to Multiple Existing Sheets
    By cloud19 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-29-2013, 03:52 PM
  5. Autolist of code in one sheet from multiples sheets in excel
    By NILESH ZALA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2013, 08:52 AM
  6. [SOLVED] How to code a macro to extract data from multiple sheets into one sheet?
    By likeabottle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2013, 04:51 PM
  7. Macro code to pull the data from different sheets to main sheet
    By Shanthuday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2012, 09:54 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