PDA

View Full Version : Solved: Autofilter and Copy Data to new workbook



mclav
09-27-2011, 02:02 PM
Hi Folks,

I primarily work on excel reporting and receive 10 reports on a monthly basis. I am trying to automate most of it with your help and guidance. :help

I apologize for being too descriptive. This is my first post in this forum and i am a novice in VBA.

I have a Source Workbook which has 6 worksheets and all the odd worksheets (Sample 1, Sample 3 and Sample 5) have data in Col A Row 4 and Col D Row 4 (the column header starts from Row 3)
Is it possible to have a VBA code to implement the following -

1. Can autofilter be applied to these odd numbered worksheets ?
2. Can the filtered data from odd numbered sheets be copied (without headers) to a worksheet of Master workbook which already has a column header at B1 and E1 on Sheet4?
3. Can the filtered data selected be deleted from the original workbook (Source)

The data in the odd numbered worksheets can increase or decrease for the autofilter range and criteria on Col A (for eg. filter criteria = dummy data 20) and Col D (for eg. filter criteria = DD104). So, I do not know how to find the last row of the data.

Thanks again for your help!
Archer

CatDaddy
09-27-2011, 04:07 PM
1.yes
2.yes
3. yes

last row can be found with Range("A65530").End(xlUp).Row

try applying the filters you want while recording a macro and the language should clear itself up a little for you...if you still need help this is a very manageable task :) i do not have time to write a whole macro for you right now but play around with it yourself a little and let me know if you need extra help

mclav
09-28-2011, 11:38 AM
Thanks a lot,

This is a good start for a novice like me :) The Macros seems to be doin' its thing!

If i have doubts, i'll post

Thanks again :bow:

Cheers
Archer