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.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Yuby Mona la Simpatie.ro
Femeie
23 ani
Arges
cauta Barbat
23 - 45 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Delete Rows That Contain Text [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 748
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


pus acum 4 ani
   
Pagini: 1  

Mergi la