JoeyGaspard
Board Regular
- Joined
- Jul 22, 2019
- Messages
- 162
Hi all, I am trying to get the below code to work, but I have something wrong. In the sections in Bold, I need it to filter the data, and delete all the entire rows containing the filtered word in "Column C" Please help! Thanks in advance!
Sub Update()
Application.ScreenUpdating = False
Sheets("Import").Select
Range(Range("A:F"), Range("A:F").End(xlDown)).Copy
Worksheets("Inventory").Range("A:F").PasteSpecial Paste:=xlPasteValues
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "USCOLDSTO"
.AutoFilter.Range.Columns("A:F").Offset(1).Copy Sheets("USCOLD").Range("A2")
.AutoFilterMode = False
End With
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "USCOLDSTO"
.AutoFilter.Range.Columns("A:F").Offset(1).Delete
.AutoFilterMode = False
End With
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "Fzr Dock"
.AutoFilter.Range.Columns("A:F").Offset(1).Delete
.AutoFilterMode = False
End With
ThisWorkbook.RefreshAll
Sheets("Inventory").Select
Application.ScreenUpdating = True
End Sub
Sub Update()
Application.ScreenUpdating = False
Sheets("Import").Select
Range(Range("A:F"), Range("A:F").End(xlDown)).Copy
Worksheets("Inventory").Range("A:F").PasteSpecial Paste:=xlPasteValues
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "USCOLDSTO"
.AutoFilter.Range.Columns("A:F").Offset(1).Copy Sheets("USCOLD").Range("A2")
.AutoFilterMode = False
End With
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "USCOLDSTO"
.AutoFilter.Range.Columns("A:F").Offset(1).Delete
.AutoFilterMode = False
End With
With Sheets("Inventory")
.AutoFilterMode = False
.Range("C1").AutoFilter 3, "Fzr Dock"
.AutoFilter.Range.Columns("A:F").Offset(1).Delete
.AutoFilterMode = False
End With
ThisWorkbook.RefreshAll
Sheets("Inventory").Select
Application.ScreenUpdating = True
End Sub