Thank you so much, i will read the reference.Hi and welcome on Chandoo !
As you can directly use an Excel feature for achieving your need
without any code just using an advanced filter !
If you really need a code, just activate Macro recorder
and redo the same manual actions : you will get your own free code !
Read also VBA inner help of AdvancedFilter method …
Introduction to Excel Advanced Filters
Extract data using Advanced Filter and VBA
Split an Excel File in to Many using VBA
Many samples to see in threads of this forum …
All is yet in provided tutorials and at beginner level …if you could give me tips about it.