Scrolling selected cell to top left position of unfrozen pane

looknsee

New Member
Joined
Apr 23, 2015
Messages
9
I have a big honkin' spreadsheet. By selecting Cell D7 and using the "Freeze Panes" command, I have ensured that the left 3 columns and the top 6 rows will always be on the screen. The rest of the spreadsheet is for data entry, and there can be hundreds of rows & columns.

I have successfully created some macros that allow me to select the next cell for data entry, but when I do that, the selected cell can appear anywhere in the "unfrozen" area.

What I would like is some VB code that will place the selected cell in the top left corner of the "unfrozen" area -- in other words, it should be in the cell that is below the column headers and to the right of the row headers. Note: the column widths, row heights, and overall zoom factor might differ, so I can't exactly hard code anything other than the number of rows and columns in the headers.

Thanks in advance.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Welcome to MrExcel

Try :

Code:
Application.Goto Selection, True
 
Upvote 0
Yes, that works. Don't know why it works, but I'll accept the incantation to the Excel gods.
Thanks.
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top