SunnyKow
Puchong, Malaysia
VIP
Members
Trusted Members
Trusted Members
Forum Posts: 1432
Member Since:
June 25, 2016
June 25, 2016
Offline
Hi Kavin, welcome to the forum.
Give this a try.
Sub DelRows()
Dim LastRow As Long
Dim i As Long
Dim ValToCompare
'Value to compare
ValToCompare = Sheets("Sheet1").Range("A1").Value
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False
For i = LastRow To 1 Step -1
If Cells(i, 1) = ValToCompare Then
'Delete entire row if cell is equal to ValToCompare
Rows(i).Delete Shift:=xlUp
End If
Next
Application.ScreenUpdating = True
End Sub
Good luck
Sunny
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Andrew Johnson, Daniel Robertson
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1917
SunnyKow: 1432
Anders Sehlstedt: 900
Purfleet: 414
Frans Visser: 346
David_Ng: 306
Hans Hallebeek: 287
lea cohen: 246
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Pawel Ganczarski
Molly King
Faraz Rafi
Anthony Blake
Jackb57
Ben Tooke
Kelsey Fennell
Jeffree Bunning
Jackie Memije
John Franzon
Forum Stats:
Groups: 3
Forums: 24
Topics: 6873
Posts: 30124
Member Stats:
Guest Posters: 49
Members: 33674
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —