Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a large Excel worksheet that I'm using to manage about a dozen projects1. The worksheet's horizontal direction corresponds to time (basically, adjacent columns correspond to consecutive days), and extends over many horizontal screenfuls. The vertical direction is much shorter (it fits easily within one screenful) and is more heterogeneous (some rows correspond to tasks, others to resources, etc.).

The first column is frozen (which is invaluable).

Here I'll use "(4-week) focus" to refer to the rectangular range of cells spanning, horizontally, a 4-week interval starting with the leftmost visible non-frozen column, and vertically, all the rows that are currently in use (which are the first 30 or so).

Of course, which specific cells are "in focus" at any given moment depends on the worksheet's current "scroll state".

Is there a way to instruct Excel to treat the current "in focus" range as if it were the entire sheet?2

Most importantly, is there a way to tell Excel to temporarily disable all scrolling, both horizontal and vertical, and not only "direct" scrolling through the scroll-arrows or scroll-bars, but also the "indirect" scrolling that happens in response to some other operation, e.g. one that makes some cell that is currently not fully visible the active cell?

It would be nice if, in addition to disabling the scrolling, fixing of the "in-focus" range caused all operations that would normally apply to the entire worksheet, to apply now only to the range that is in focus. E.g. CTRL-END would make active the cell on the lowest used row of the rightmost used column within the in-focus range (rather than for the whole worksheet).

Is there a way to do something like this?


1 Yes, I know there's specialized software for doing this sort of thing, but for my purposes Excel works fine, thankyouverymuch.

2 For those familiar with Emacs, the operation I have in mind is entirely analogous to Emacs's narrow-to-region command.

share|improve this question

what you need is the .ScrollArea property which returns or sets the range where scrolling is allowed, as an A1-style range reference. Note also that cells outside the scroll area cannot be selected.

This sets the scroll area for the first worksheet to C1:AA22:

Worksheets(1).ScrollArea = "C1:AA22"

Set this property to an empty string "" to enable cell selection for the entire sheet.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .