+ Reply to Thread
Results 1 to 3 of 3

Debug Filter Data into Separate Worksheets

  1. #1
    Registered User
    Join Date
    07-08-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    Microsoft 2016
    Posts
    2

    Debug Filter Data into Separate Worksheets

    Hi everyone!

    Brand new here so feel free to let me know if there is any etiquette that I missed. I am trying to create a macro that will take data ("Total Summary") and split it into separate worksheets based on unique values in one of the data columns. I found a YouTube video in my search on how to do this and tried to replicate it with a few adjustments. Can't post the link because I'm too new, but it's called "Split a Master Spreadsheet into Multiple Sheets with 1 click - VBA for Beginner" by Caripros HR Analytics.

    Below is the code I ended up with, as well as the basic steps I tried to accomplish.
    1. Copy the data from "Total Summary" tab into the "Season Payout Form" tab - The reason I decided to put it on a different spreadsheet was because I was planning on adding various formatting/formulas to it later and wanted to preserve a clean data dump tab.
    2. For each cell in this list of unique values I have on a separate sheet ("Project List"), copy the "Season Payout Form" tab into another spreadsheet
    3. Name the new spreadsheet after the cell value
    4. Filter the new spreadsheet data by everything that is not the cell value and delete it
    5. Show all data to display what is left, which should just be the line items related to the cell value
    6. Go to the next cell
    7. Rinse and repeat until complete

    When I ran the macro, I encountered "Run-Time Error 9" on the line where it starts referencing the new sheet to filter the data. I've tried figuring out how to debug it, but to no avail. Any insight as to how to fix this? All I know is that it has something to do with not being able to find the sheet in question. Also, if you have any suggestions about a better way to do this, let me know! I thought about filtering the data and then copying it, but I wasn't able to find any ready-to-use macro that I could understand enough to adjust. Thanks in advance! Also, dummy spreadsheet attached, in case it helps.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    04-21-2007
    Location
    Where your mind is
    MS-Off Ver
    OS 2010, 2013, 365.
    Posts
    42

    Re: Debug Filter Data into Separate Worksheets

    NT019,

    replace the code after line
    Please Login or Register  to view this content.
    with the following code. That would do the trick...

    Cheers

    CEO76


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-08-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    Microsoft 2016
    Posts
    2

    Re: Debug Filter Data into Separate Worksheets

    Thank you so much! That did take care of the issue.

+ 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. [SOLVED] VBA to auto filter to separate worksheets?
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-26-2016, 12:34 PM
  2. [SOLVED] VBA to filter and copy certain data into a separate tab
    By The_Snook in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2013, 10:51 AM
  3. separate the data from the 25 entries on the master to separate worksheets
    By nemo12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2012, 09:27 AM
  4. Macro to filter data in to separate worksheets
    By Nicola86 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 02:02 PM
  5. Macro to filter data to separate worksheets
    By rushdenx1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2010, 06:28 AM
  6. Advanced Filter from 2 separate worksheets
    By stevedes7 in forum Excel General
    Replies: 4
    Last Post: 12-28-2009, 12:20 AM
  7. Save 2 separate data imports in separate worksheets on the same ex
    By Jay in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-08-2006, 09:35 AM

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