I have some items containing "Duplicate" in Col W
i have tried to write code to delete all rows where "Duplicate" appears" in Col W, but these rows are not being deleted
It would be appreciated if someone could kindly assist me
I have some items containing "Duplicate" in Col W
i have tried to write code to delete all rows where "Duplicate" appears" in Col W, but these rows are not being deleted
It would be appreciated if someone could kindly assist me
try this instead:
![]()
Sub Delete_Duplicates_ColW() With Sheets("imported Data") .Range("$A$5").AutoFilter Field:=23, Criteria1:="Duplicate" .AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp) .AutoFilterMode = False End With End Sub
<<< If you have valued anyone's contributions in this thread, please click * to thank them for their efforts
Many Thanks for the help
![]()
With Cells(5, 1).CurrentRegion.Columns(23) .Value = Evaluate("=IF(" & .Address & "=""Duplicate"",1," & .Address & ")") .SpecialCells(xlCellTypeConstants, xlNumbers).EntireRow.Delete End With
Good Luck...
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
Also....Add a comment if you like!!!!
And remember...Mark Thread as Solved...
Excel Forum Rocks!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks