MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Using Go To doesn't put the cell where I want it...


Posted by Elisabeth on March 08, 2001 12:22 PM

In Quattro, I can use the Go To command and if I say I want to see Z103, it whisks me there and puts Z103 as the most upper left hand cell. In Excel, it takes me to Z103, but it could be in the middle of my page. How do I get Excel to place the cell I want to go to in the upper left hand corner of my spreadsheet?


Posted by Mark W. on March 08, 2001 12:35 PM

Go to IV65536 first.

Posted by Elisabeth on March 08, 2001 12:52 PM

Excellent suggestion. It works beautifully using the Go To from Excel.

However, I wasn't very clear in my question. I am trying to use this Go To function in a Macro attached to a button. I implemented your suggestion in the following:

Sheets("A").Select
Range("IV65536").Select
Range("Z104").Select

Z104 came back in the middle of my screen. Is there a different kind of command I should be using in the Macro?

Posted by Mark W. on March 08, 2001 1:15 PM

Application.Goto Reference:="R65536C256"
Application.Goto Reference:="R104C26"

Posted by Elisabeth on March 08, 2001 1:22 PM

One possibility is that your workbook contains named dynamic ranges. You can see them via Insert|Define|Name. It seems Excel has to check whether or not one of these ranges expanded AFTER ANY ENTRY ANYWHERE. One solution is, I guess, to use a faster computer.

Aladin

Posted by Dave Hawley on March 08, 2001 2:08 PM

Try and avoid Excels Last Cell.

Hi Elisabeth

I would avoid the use of Last Cell especially if used in VBA. To see my reasons,some detail and better alternatives follow my link to my web page and click the "VBA Tips and Tricks".

Dave

BTW to place the cell in the upper left of your screen use:

Application.Goto _
Reference:=Sheets("Sheet1").Range("D20"), Scroll:=True

OzGrid Business Applications

Posted by Elisabeth on March 08, 2001 2:18 PM

You are BEAUTIFUL. Consider yourself very humbly bowed to...

Thank you so much. It worked.