Hi All,
I am struggling with copying over a filtered table from one workbook to another. the workbooks are both open.
The table is in the commission tab in the Sales Master - 2018.xlsm file
So, I need to filter the table to show all the data of the name of the person at the end of the filename, the filename is: "Sales File - Billy.xlsm"
Then copy this filtered table into the commission tab in Billy's sales file
The filepath for the master file is in a named cell in the data tab in Billy's file.
I have tried to code this in different ways but to no avail.
Hope this makes sense.
Thank You!!
Set wkb = ThisWorkbook
Set wkb1 = Sheets("Import Directory (2)").Range("ImportFilePaths_2")
wkb.Sheets("CASH BONUS").Delete
wkb1.Sheet("CASH BONUS").Copy After:=wkb.Sheets("CASH BONUS")
wkb.Sheets("CASH BONUS").ListObjects("table_CashBonus").Range.AutoFilter Field:=3, Criteria1:="<>SelectedName"
ActiveSheet.Range("$B$4:$G$" & Lines).Offset(1, 0).SpecialCells _
(xlCellTypeVisible).EntireRow.Delete
I am struggling with copying over a filtered table from one workbook to another. the workbooks are both open.
The table is in the commission tab in the Sales Master - 2018.xlsm file
So, I need to filter the table to show all the data of the name of the person at the end of the filename, the filename is: "Sales File - Billy.xlsm"
Then copy this filtered table into the commission tab in Billy's sales file
The filepath for the master file is in a named cell in the data tab in Billy's file.
I have tried to code this in different ways but to no avail.
Hope this makes sense.
Thank You!!
Set wkb = ThisWorkbook
Set wkb1 = Sheets("Import Directory (2)").Range("ImportFilePaths_2")
wkb.Sheets("CASH BONUS").Delete
wkb1.Sheet("CASH BONUS").Copy After:=wkb.Sheets("CASH BONUS")
wkb.Sheets("CASH BONUS").ListObjects("table_CashBonus").Range.AutoFilter Field:=3, Criteria1:="<>SelectedName"
ActiveSheet.Range("$B$4:$G$" & Lines).Offset(1, 0).SpecialCells _
(xlCellTypeVisible).EntireRow.Delete