Making a Cell the First Cell in the Active Window

To make the top-left cell of a report be the first cell in the active window:

Before: Cell C4 is the first cell in the Financial Highlights report, see screenshot
After: Cell C4 is the first cell in the active window, see screenshot

1. Press Alt+F11 to open the VBE (Visual Basic Editor).
2. Double-click any Module sheet under VBAProject.
OR
From the Insert menu, insert a new Module.
3. Type the following code in the Module sheet:
Sub ActiveCell_To_FirstCellCorner()
Application.Goto ActiveCell, True
End Sub
4. Press Alt+F11 to return to Excel.
5. Press Alt+F8 and from the Macro dialog box, select the macro.
6. Click Run to operate the macro.
Screenshot // Making a Cell the First Cell in the Active Window

Making a Cell the First Cell in the Active WindowMaking a Cell the First Cell in the Active WindowMaking a Cell the First Cell in the Active Window

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.