I need some help with a macro. I created an event where a cell is changed and thus updates the table by filtering with the number that gets updated- this part works fine. The problem I'm having is that the macro I created is supposed to copy the filtered information and paste it into a new Workbook and worksheet and instead, it copies the correct number of rows of the table filtered, but starting in row one. To exemplify: the table is filtered in row 1 and the data shows in 3 rows (Numbers 3, 9, 210), instead of copying those three rows, it copies (or pastes) row 1,2,3,and 4. So, I need to know if there´s anyway to only copy and the filtered data. Any help will be greatly appreciated!
Here´s what the piece of code looks like:
Sheets("Variación en Detalle").Select
Range("A1:L1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book1").Activate
Sheets("Sheet3").Select
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Here´s what the piece of code looks like:
Sheets("Variación en Detalle").Select
Range("A1:L1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book1").Activate
Sheets("Sheet3").Select
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False