display on screen part of worksheet

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I would like a macro that scrolls down and only displays
part of a worksheet. I have the first 10-13 rows that are
not required to be displayed. I want to be able to run a
macro that finds data in the first row I want and then
sets that row as the top row displayed. What I want is
the display scrolled so that the first 10-13 rows are
scrolled of the top so that the first line showing is the
line with the data I need to see. The number of header
lines varies, but there is always a cell in one row that
is constant and unique, so I could search for that cell
data to find the row to display. When I do that by itself
it shows the header rows too.

Thanks in advance.
 
Something like this ? :-

'-------------------------------------------------
Sub test()
rsp = InputBox("Data to find")
If rsp = "" Then End
Set foundcell = ActiveSheet.Cells.Find(what:=rsp)
If foundcell Is Nothing Then
MsgBox ("Not found")
Else
Application.Goto ActiveSheet.Range("A" & foundcell.Row),
Scroll:=True
End If
End Sub
'--------------------------------------------------
 
Back
Top