Announcement

Collapse
No announcement yet.

Loop thru filter criteria and save to a new workbook

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loop thru filter criteria and save to a new workbook



    Hi Experts

    I really need your help for the following situation.

    " Row 1 - 4 is the titles. Column Y has multiple different criteria.

    What I want to do is: 1. Filter column Y to see the first criteria. 2. Copy from row 1 to the last used row, and column A-X. 3. Save it as a new workbook. Name it exactly like column Y criteria. I have the File path on Sheets("Detail").Range("D17"). (Cell D17 has a path like this: C:\Users\Aiden\Desktop.......................) 4. Close the new workbook 5. Go back to the main file. filter column Y for next criteria. 6. Copy..save as new workbook....keep going until we loop thru all criteria on column Y.

    Can someone please help me with this?

  • #2
    Hello and Welcome to the Forum

    From your explanation, it seems to me the very ... very first step is to create a UNIQUE list of your data located in Column Y ...

    Would you agree ?

    Rather strange to read your Titles are spread over 4 rows ...!!! why ???
    Last edited by Carim; July 7th, 2019, 20:19.
    If you feel like saying "Thank You" for the help received ...You can click on the "Like" icon ...just underneath ... ... in the bottom right corner ...

    Comment


    • #3
      Hi Carim

      Thank you for your time to read this!!!
      Yes I have a tab like this:

      First 3 column below is like column A-X. Column Y is the criteria column
      ID Date expenses criteria column
      11452 7/7/2019 $10 Tom
      11452 7/14/2019 $12 Tom
      11222 7/1/2019 $11.9 Aiden
      11666 6/1/2018 $203 Tony
      First filter. Copy column A-X and save as a new workbook with the file name "Tom"
      ID Date expenses criteria column
      11452 7/7/2019 $10 Tom
      11452 7/14/2019 $12 Tom
      Second filter. Copy column A-X and save as a new workbook with the file name"Aiden"
      ID Date expenses criteria column
      11222 7/1/2019 $11.9 Aiden
      Keep doing it until we loop thru all criteria in column Y.

      For the first 4 row. I know it sounds super weird.
      But I wont be able to import the file without the first 4 rows.

      Comment


      • #4


        Please see picture below

        Comment

        Working...
        X