Advanced Filter, copy to last empty cell

  • Hi guys,


    I'm a huge amature with VBA but i need to design a certian excel sheet for my work place.

    ive tried to achieve this by copying codes from other peoples examples however havent been able to sucessful.


    What im trying to do is ;

    Sheet7 "PLAN" contains a table "TABLE4" which contains the bill of material for the product we are planing to produce.

    the table automatically marks products which need to be ordered.


    What i need to achieve is to use the advanced filter to filter and copy the products which need to be ordered to a new purchasing sheet.

    however i need all the data to remian once the advanced filter is used.


    in the future the plan will constantly chance and all the new products need to contantly be added to the purchasing sheet.


    ive managed to create a macro which does this however it doesnt add to the list only pastes and keeps it the same.


    Code
    Sheets("PLAN").Range("Table4[#All]").AdvancedFilter Action:=xlFilterCopy, _
    CriteriaRange:=Sheets("PLAN").Range("AA3:AA4"), CopyToRange:="SIPARISLER!Extract", Unique:=True


    i need it to paste to the next empty cell or row in the SIPARISLER!EXTRACT


    Can anyone help me with this ?

  • Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post


    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.


    How to use code tags


    Just highlight all of the code and press the <> in the post menu above button to add the code tags.


    Thanks.

  • I think this is what you want based on your code, but it only copies one column because you only specify one column in the Criteria

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!