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: Hans Hallebeek
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1939
SunnyKow: 1432
Anders Sehlstedt: 930
Purfleet: 415
Hans Hallebeek: 355
Frans Visser: 349
David_Ng: 312
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
bcWAyKVE bSFTQQDIdk
HMDIGPzunsnLJt lObJcycvbDLCmIq
Stephen Brown
John Kang'ara
iDeYYtyNRPTss icXlxLtkCZaWuY
Elizabeth Kinsey
Shaun Del Toro
Clive Webb
Forum Stats:
Groups: 3
Forums: 25
Topics: 7095
Posts: 31110
Member Stats:
Guest Posters: 49
Members: 34532
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —