Share via

Go to Bottom

Anonymous
2011-06-21T18:18:24+00:00

Hello,

i need a macro that goes to the bottom of an excel document, based on the location of the lowest cell with entry data. i have one for GoToTop:

Application.OnKey "^+T", "GoToTop"

ActiveWindow.ScrollRow = 1

ActiveWindow.ScrollColumn = 1

but to go to the bottom it would need to do a quick search for the lowest row with entry data

thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2011-06-22T02:14:55+00:00

    For a displayed value, try this...

    ActiveSheet.Cells.Find(What:="*", SearchOrder:=xlRows, _

          SearchDirection:=xlPrevious, LookIn:=xlValues).Select

    On the other hand, if you have formulas and some of those formulas are displaying the empty string and you want to go to the last cell with a formula even if that formula is displaying the empty string, then try this instead...

    ActiveSheet.Cells.Find(What:="*", SearchOrder:=xlRows, _

          SearchDirection:=xlPrevious, LookIn:=xlFormulas).Select

    Your description makes it sound like you want the first code line.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-06-22T02:11:49+00:00

    Hello,

     

    i need a macro that goes to the bottom of an excel document, based on the location of the lowest cell with entry data. i have one for GoToTop:

    Application.OnKey "^+T", "GoToTop"

    ActiveWindow.ScrollRow = 1

    ActiveWindow.ScrollColumn = 1

    but to go to the bottom it would need to do a quick search for the lowest row with entry data

     

    thanks

    Doesn't Excel have this built-in?  CTRL+HOME and CTRL+END.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2011-06-22T02:03:22+00:00

    ActiveSheet.UsedRange.End(xlDown).Select

    Was this answer helpful?

    0 comments No comments