• Navigation

    Author
    Topic
    #354387

    Using Excel 2000. I have information in cells a1:a100 and b1:b100. My cursor is in cell b100 which has data in it. In cells b1:b100, some cells have “NO DATA” in them. I’m looking for a “keyboard shortcut” to get from b100 to b1. I know I can use the name box but is there a key combination that does it.

    Thanks,

    Don

    P.S. – If I use Ctrl+ up arrow, it just goes to the next blank cell in the column.

    Viewing 2 reply threads
    Author
    Replies
    • #520633

      You could create a Sub procedure like the one below and assign it to a shortcut key:

      Public Sub GoToTop()
          Cells(1, Selection.Column).Select
      End Sub
      
    • #520647

      As Legare said, you can attach a shortcut key to a macro. The one he proposed does the job, but there are all kind of variations to the theme. Here you have a macro, that, no matter where the range is located (e.g. it can be b101:b200″), selects the first cell with data (e.g. b101) if this cell is the first cell in that column which is not empty. Actually the End property of the Activecell emulates the operation Ctrl + ArrowKey. You can go in other directions, using xlUp, xlToLeft, xlToRight and xlDown.
      e.g. if you want to go to the last non-empty cell in column A, you can start from the bottom of the worksheet and go up, as long as A65536 is empty:
      Range(“A65536”).End(xlUp).Select

      Sub GotoTopofRange()
      Dim i As Integer
      Do
      ActiveCell.End(xlUp).Select
      i = i + 1
      Loop Until ActiveCell.Row = 1
      If IsEmpty(ActiveCell) And i > 1 Then
      ActiveCell.End(xlDown).Select
      End If
      End Sub

    • #520671

      Ctrl-Home will take you to A1, just a hop to B1 then.

    Viewing 2 reply threads
    Reply To: Navigation

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: