Ulisses_Carso
New Member
- Joined
- Sep 4, 2020
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
Good afternoon,
I have small code to delete rows based on cell value, but my code doesn't work if the value is formula result.
I Make a ProcV to find a cell and i need to search and delete a row based on that ProcV but i can't figure a way to do that.
Can someone give me a light on how to solve.
I have small code to delete rows based on cell value, but my code doesn't work if the value is formula result.
I Make a ProcV to find a cell and i need to search and delete a row based on that ProcV but i can't figure a way to do that.
Can someone give me a light on how to solve.
VBA Code:
Sub BuscaDeletaPlaca()
Dim rngFound As Range
Dim sht1 As Worksheet
Set sht1 = ThisWorkbook.Worksheets("Base")
With sht1.Range("A:A")
Set rngFound = .Find(What:="desligado")
If Not rngFound Is Nothing Then
While Not rngFound Is Nothing
sht1.Rows(rngFound.Row).EntireRow.Delete
Set rngFound = .FindNext
Wend
End If
End With
End Sub