+ Reply to Thread
Results 1 to 11 of 11

Create separate workbooks based upon automatic filtering

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Create separate workbooks based upon automatic filtering

    Hi guys, hope you can help.

    Please find attached a workbook containing fictional figures but containing formulae to extract information from the individual sheets (Employee 1 to Employee 5) to the Salary summary and Pay Remittance sheets.

    What I'm looking for is to create a separate workbook for each employee containing all the information on the Pay Remittance sheet when the value in cell L1 matches the dates in A10:A23 and also for the macro to run through all of the options in the drop down box in cell B3.

    Please note, this was created in Excel 2007, but need it to work in Excel 2010.

    Thanks, as always in advance.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Re: Create separate workbooks based upon automatic filtering

    Hi guys.

    Anyone able to provide a solution to this one?
    Is a possible stumbling block technically asking it to perform two filters simultaneously for each employee?

    I would be really grateful of any assistance with this.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create separate workbooks based upon automatic filtering

    Hi monkeypants

    What I'm looking for is to create a separate workbook for each employee containing all the information on the Pay Remittance sheet when the value in cell L1 matches the dates in A10:A23
    Where do you wish the Files to be saved...what's the File Naming Convention?
    Last edited by jaslake; 05-21-2017 at 05:08 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Re: Create separate workbooks based upon automatic filtering

    Hi Jaslake,

    The ideal file naming will be the 11111.pdf, 22222.pdf, 333.pdf etc i.e. contents of pay remittance sheet G3 (which will change when the filter in cell b3 is applied). They will be saved to a folder called remittances on the desktop.

    Kind Regards,

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create separate workbooks based upon automatic filtering

    Hi monkeypants

    Try this Code in the attached...let me know of issues.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jaslake; 05-22-2017 at 04:05 PM.

  6. #6
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Re: Create separate workbooks based upon automatic filtering

    Hi Jaslake,

    Apologies, I thought I replied earlier...

    My original message thanked you for taking the time to look into this for me.

    My feedback was that after assigning the range Salary Summary! A7:A11 as Employees, it failed at the following step:

    .Range("A10:F" & SrcLR).AutoFilter Field:=1, Operator:= _
    xlFilterValues, Criteria2:=Array(1, TgtWs.Cells(1, "L").Value)Kind Regards and thanks again for your help.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create separate workbooks based upon automatic filtering

    Hi monkeypants

    I'm unable to duplicate the error...please attach the offending File...
    Last edited by jaslake; 05-29-2017 at 01:42 PM.

  8. #8
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Re: Create separate workbooks based upon automatic filtering

    Hi Jaslake, Thanks for your reply.

    I'm on leave until Friday, will respond fully then.

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create separate workbooks based upon automatic filtering

    Hi monkeypants

    I'll be in and out myself for a bit...get back if/when you need help...

  10. #10
    Registered User
    Join Date
    11-12-2014
    Location
    Newcastle, England
    MS-Off Ver
    2010
    Posts
    54

    Re: Create separate workbooks based upon automatic filtering

    Hi Jaslake,

    Please find attached my offending file. It still falls down at the same place.

    Many Thanks.
    Attached Files Attached Files

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create separate workbooks based upon automatic filtering

    Hi monkeypants

    For starters the Structure of your File is different from the Structure of the File I was working with. However, the Code does not error for me on your File...it simply returns incorrect data.

    Fix the Structure and run the Code again...if it still errors then upload the offending File...I can't duplicate the error on your most recent file..
    Attachment 522715
    Attached Images Attached Images

+ 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. Copy/Paste from separate workbooks based on criteria
    By villa123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2017, 03:28 PM
  2. Separate data from Sheet1 to other Sheets based on filtering and conditional formating
    By dougwilson1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2015, 11:16 AM
  3. Create automatic advanced filtering Code
    By netanel99 in forum Excel General
    Replies: 7
    Last Post: 06-03-2013, 03:00 AM
  4. [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
  5. Macro to create workbooks with key field name and automatic email
    By su_nil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2010, 09:16 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