S
scott
I just need to move down column B to find the 1st cell containing a word.
Then I'll be able to get it's row and column.
Any help?
Then I'll be able to get it's row and column.
Any help?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
scott said:is there a way to unmerge all merged cells on a sheet?
delete all rows between B1 and 1 row before 1st cell containing Branch".
Tom Ogilvy said:Yes, I can tell you why. Because that is what you asked for.
If you want to include row1, then
Sub Tester3()
Dim rng As Range, rng1 As Range
Set rng = Cells(Rows.Count, 2).End(xlUp)
Set rng = Range(Range("B1"), rng)
Set rng1 = rng.Find(What:="Branch", _
After:=Range("B1"), _
LookIn:=xlValues, _
Lookat:=xlWhole, _
SearchOrder:=xlByRows)
If Not rng1 Is Nothing Then
Range(Range("B1"), _
rng1.Offset(-1, 0)).EntireRow _
.Delete
Else
MsgBox "Branch not found"
End If
End Sub
change B2 to B1 as I have done above.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.