none
Filter data, copy visible cells (no header) and paste to specified tab on the next empty row RRS feed

  • Question

  • Hi 

    I am new to VBA. I am trying to copy my filtered data - WITHOUT the header - and paste it to a specified sheet name in the next empty row on that sheet. 

    This is what i have from my recorded macro

        Sheets("Total Activity").Select
        Range("A1").Select
        Range(Selection, Selection.End(xlToRight)).Select
        Selection.AutoFilter
        ActiveSheet.Range("$A$1:$Q$100000").AutoFilter Field:=17, Criteria1:= _
            "C8C308"
        Selection.Copy
        Sheets("C8C308").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets("Total Activity").Select
        Range("A1").Select
        Range(Selection, Selection.End(xlToRight)).Select
        ActiveSheet.Range("$A$1:$Q$100000").AutoFilter Field:=17
        Range("A1").Select

    This code pastes the header and doesn't paste to the next empty row. I need to know what to adjust.

    Thanks in advance!

    Wednesday, December 3, 2014 7:55 PM