Company and above (which can be found somewhere a1:100)
e.g. if "company" is on row 30 than I want to hide rows 1 through (and including) 30
My first try at vba... but this it what I was trying:
Sub Hiderows()
Dim lastRow As Integer
Set lastRow = Cells.Find(What:="Company:", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False)
Rows("A1" & ":" & lastRow).EntireRow.Hidden = True
End Sub
But this doesn't work as I'm doing something wrong
Bookmarks