View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Clayton McGuire Clayton McGuire is offline
external usenet poster
 
Posts: 7
Default Navigating with keyboard after using offset on merged cells

Dear Gurus,

Excel 2000, 2002.

In a worksheet, highlight A1:C1, click on the merge cells button.
In the immediate pane of the VBE, enter
"Activecell.Offset(10,0).Select".
Go back to Excel. As expected, A11 is highlighted.

The unexpected? Press the right arrow key, and the cursor moves to
D1, not B11.

I've got a procedure attached to a shortcut key to speed up navigating
around a spreadsheet (jumping a specified number of rows/columns
according to the offset). But the cursor seems to remember the merged
cell (eg if you execute the offset command several times, you may end
up several screens down, but the moment you hit the left or right
arrow key you're back to where you started).

I few things to note - the workbooks I'm looking at aren't mine, so
the obvious solution of "don't use merged cells" isn't an option.
Secondly, it doesn't always appear to be consistent - in the example
above, up and down keys work as expected but left and right don't.
Also appears that how you enter the cell has a bearing - if the cursor
is in D1, then you press left arrow, then run the offset, it displays
the behaviour as above, but if you're in (say) B10 and hit
Ctrl-UpArrow, then perform the offset, the cursor moves as expected
when the arrow keys are used.

Has anyone come across this behaviour before? And (more importantly)
a way to get around it. Is this another one of those "features" that
they don't tell us about?

Kind regards,

Clayton.