Positioning a cell in a spreadsheet

jamesbradleymiller

New Member
Joined
Nov 29, 2005
Messages
1
I am developing a spreadsheet and I would like a create a macro that will select a specific cell in the worksheet and move it to the top left corner.

Can anyone help me with this?

Thanks in advance.

JBM
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Try
Code:
Sub aaa()
 Range("D8").Select
 ActiveWindow.ScrollColumn = Selection.Column
 ActiveWindow.ScrollRow = Selection.Row

End Sub


Tony
 

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
Or with the ActiveCell:

Code:
Sub ScrollToTopLeft() 
    With ActiveWindow 
        .ScrollRow = ActiveCell.Row 
        .ScrollColumn = ActiveCell.Column 
    End With 
End Sub

HTH
 

Watch MrExcel Video

Forum statistics

Threads
1,118,327
Messages
5,571,560
Members
412,405
Latest member
DutchMonkey
Top