Forum

Find first match ce...
 
Notifications
Clear all

Find first match cell that contains specific char

2 Posts
2 Users
0 Reactions
682 Views
(@alano1)
Posts: 1
New Member
Topic starter
 

Data that I have in a column F are:

??? spelling :37:11 PM ++++
??? What is this ++++ Created by:system (System) at 5/21/18 3:37:12 PM ++++
??? Hello World ++++ Created by:system (System) at 5/21/18 3:37:11 PM ++++
++++ Created by:system (System) at 5/21/18 2:33:30 PM ++++
++++ Created by:system (System) at 5/21/18 2:33:30 PM ++++

How do I locate the first cell that starts with ++++, in this case, row 4, then from there Select the entire row (ie. col A to F) then all rows below it and delete.

Hope that's clear.

Thanks.

 
Posted : 16/06/2018 6:11 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Alan

Give this a try.

Sub DelRow()
Dim FirstRow As Long
Dim LastRow As Long
FirstRow = Application.Match("++++*", Range("F:F"), 0)
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
Rows(FirstRow & ":" & LastRow).Delete Shift:=xlUp
End Sub

Sunny

 
Posted : 18/06/2018 12:43 pm
Share: