Issues with autofilters

Tucker92

Board Regular
Joined
Jun 7, 2018
Messages
53
I have been experimenting with auto filters and was wondering if there is a way that i could get it to copy the information to another workbook but don't know how. Can anyone help me?

Here is what i have so far but i don't know why it doesn't work. Hopefully what i'm trying to do is possible
and i havent done it all wrong.
Code:
Sub Copy_12()


Dim ws As Worksheet
     Set ws = Application.Workbooks("Carry Over").Sheets("Vac A")
     Dim data_end_row_number As Long
     data_end_row_number = ws.Range("A2").End(xlDown).Row
       
    ws.Range("table6").AutoFilter Field:=13, Criteria1:="12 WET", VisibleDropDown:=True
    ws.Range("A2:B" & data_end_row_number).SpecialCells(xlCellTypeVisible).copy
    Windows("Vac AC").Sheets("12 Wet").Range("D2").Select
        ActiveSheet.Paste
         ws.Range("D2:F" & data_end_row_number).SpecialCells(xlCellTypeVisible).copy
    Windows("Vac AC").Sheets("12 Wet").Range("D2").Select
    ActiveSheet.Paste
 
Last edited by a moderator:

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,829
Messages
6,181,224
Members
453,025
Latest member
Hannah_Pham93

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top