Looking ahead

  • Thread starter Thread starter free4all
  • Start date Start date
F

free4all

I'm working a spreadsheet --- 26,000 records --- and while applying data
into cells I want to be able to see ahead to compare 2 or more rows at
a time.

As it is, I scroll down (using arrow keys, of course) and then arrow up
back to where I want to review data.

I have a freeze for column headings and I attempted to split panels,
but this only allows reviewing data statically in one window. What I
would like to do is review ahead 3 or more rows, while typing data into
a cell; and when I <enter> down the next row, my view would not be
limited by the bottom of the screen, but would move ahead --- so
movement of the cursor down would cause my view of the sheet to shift
down --- and NOT have the cursor reach the bottom, thus end my view of
the next several rows until I scroll all the way down and all the way
back up.
 
You could try this:

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveWindow.ScrollRow = Application.Max(1, Target(1).Row - 5)
End Sub


Right click on the worksheet tab that should have this behavior. Select view
code. Paste that in.

You may want to play around with that "5" to make it work the way you want.
(It'll depend on where you have that windows|freeze panes set.)
 
Back
Top