+ Reply to Thread
Results 1 to 6 of 6

Macro to Filter by PVT, Copy and Create Individual Files

  1. #1
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    Macro to Filter by PVT, Copy and Create Individual Files

    Need assistance with macro that will Filter the Data tab by Column B “Profile Code” or create a Table by Profile Code. Select each Profile Code ,copy all lines and headers and then Create a .xls file and Place the copied date into the new file into a Folder c: My Document/Test/ Save and loop to the next Profile Code and do the same things:
    And is there a way I can add this to the back end of the Macro that is currently there so I don’t have to run 2 different Macros.

    Sample Spreadsheet is attached
    Attached Files Attached Files

  2. #2
    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: Macro to Filter by PVT, Copy and Create Individual Files

    Hi GCLIFTON

    You indicate to create .xls Files. What's the earliest version of Excel in which the Code needs to run?
    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.

  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: Macro to Filter by PVT, Copy and Create Individual Files

    Hi GCLIFTON

    Try this Code in the attached. The Code to run the Workbook creation is called from your existing Code. Please change the Path to where the New Workbooks are to be saved.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    Re: Macro to Filter by PVT, Copy and Create Individual Files

    Received this error when attempting to run.

  5. #5
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    Re: Macro to Filter by PVT, Copy and Create Individual Files

    Sorry forgot the attachment The first highlighted is the error line and i attempted to skip and the later two errors occurred when attempting to skip
    Attached Images Attached Images

  6. #6
    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: Macro to Filter by PVT, Copy and Create Individual Files

    Hi GCLIFTON

    No idea...runs as expected on my platform. Do you have the issue on the File I attached?

    Do you have a Worksheet called "Data"? You did in your sample file.

    Your Code is missing the trailing "\" in the variable "myPath"
    Last edited by jaslake; 11-09-2016 at 05:20 PM.

+ 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. Create individual files from a row
    By GrahamN in forum Excel General
    Replies: 5
    Last Post: 07-13-2017, 03:28 AM
  2. Replies: 2
    Last Post: 08-18-2014, 08:39 PM
  3. How do I create a macro that will split my spreadsheet into individual files?
    By DJ3679 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2014, 07:02 PM
  4. How do I create a macro that will split my spreadsheet into individual files?
    By DJ3679 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2014, 03:20 PM
  5. create a macro that will run a filter, of all 5 files against the picture column
    By ajhaspel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2008, 01:30 PM
  6. [SOLVED] Need macro to filter, create tab on filter and copy/paste
    By Jen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2006, 11:50 AM
  7. set up a macro to copy/ move sheets to individual files
    By Danielle44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2006, 12:45 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