Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Nou pe simpatie: Profil Alesiandra
 | Femeie 24 ani Cluj cauta Barbat 28 - 58 ani |
|
|
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
TRaPModerator
Postari: 964
|
|
Delete rows from column A if cells contain the word "random"
Sub DeleteRowWithContents()
Application.ScreenUpdating = False '======================================================================== ' DELETES ALL ROWS FROM A2 DOWNWARDS WITH THE STRING "random" IN COLUMN A '======================================================================== Last = Cells(Rows.Count, "A").End(xlUp).Row For i = Last To 1 Step -1 If InStr(Cells(i, "A").Value, "random") Then 'Cells(i, "A").EntireRow.ClearContents ' USE THIS INSTEAD OF NEXT TO CLEAR CONTENTS BUT NOT DELETE ROW Cells(i, "A").EntireRow.Delete End If Next i Application.ScreenUpdating = True End Sub |
|
|
| |
|