nniedzielski
Well-known Member
- Joined
- Jan 8, 2016
- Messages
- 590
- Office Version
- 2019
- Platform
- Windows
I am running this code here, and it works great, but the problem is at no point is it taking the formula and copying it down to the last row in Column T. What am i missing?
VBA Code:
With Sheets("Master Inventory")
.Range("Z2").Formula = "=COUNTIF(A$2:A2,A2)<=VLOOKUP(A2,'Lists'!C:D,2,0)"
With .Range("A1", .Range("A" & .Rows.Count).End(xlUp)).Resize(, 3)
.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=.Range("Z1:Z2"), Unique:=False
.Copy Destination:=Sheets("Fruits").Range("A1")
.Offset(1).EntireRow.Delete
.Range("Z2").ClearContents
End With
.ShowAllData
End With