How can i find a specific text in column A(Eg find AAAA in column A) and then delete all the rows including the row containing text plus one more row.
Best Regards/VKS
How can i find a specific text in column A(Eg find AAAA in column A) and then delete all the rows including the row containing text plus one more row.
Best Regards/VKS
Hi VKS,
Is there any specific criterion for deleting the "one more row"? You can use the Find...FindNext function.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
try this
![]()
Sub deleteLoop() Dim result As Range Do Set result = Columns("A").Find("AAAA", lookat:=xlPart) If result Is Nothing Then Exit Do Else result.EntireRow.Resize(2).Delete End If Loop End Sub
Best Regards
MaczaQ
---------------------------------------------------------------------------------------------------------------------------
If you are satisfied with the solution(s) provided, please mark your thread as Solved
If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
- This way you will add him some reputation points ... thanks in advance.
@MaczaQ: Thanks for your help. Its bit late in my part of the world will try your code tmow and let you know.
Thanks for your help and time.
Best Regards/VKS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks