Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2003
    Location
    Germany
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cursor jump to specific letter (Excel 2000)

    Hi everyone,

    A colleague has a large Excel file with several thousand lines. One of the columns contains names, and she would like to be able to jump to the start of the names beginning with H (for example), in the same way as in the Windows Explorer, i.e. press H then the enter key and the cursor jumps automatically to the first entry starting with H. Can anyone tell me if this is possible in Excel, and if so, how to set it up? We already know how to sort columns and use filters, neither of these possibilities quite hits the spot.

    Many thanks for any help.

    June

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Cursor jump to specific letter (Excel 2000)

    I think you'd need to write a macro that used the find function to do this.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Cursor jump to specific letter (Excel 2000)

    This MS newsgroup thread includes some macros that may assist.

  4. #4
    New Lounger
    Join Date
    May 2003
    Location
    Germany
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor jump to specific letter (Excel 2000)

    This page looks interesting. I'll try out the macro ideas given and see if they can speed things up for my colleague.

    Many thanks for your help.

    June

  5. #5
    New Lounger
    Join Date
    May 2003
    Location
    Germany
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor jump to specific letter (Excel 2000)

    The link you gave led to a successful conclusion, Tony. Many thanks!

    I based this macro on a post by David McRitchie on 31 Oct 2002 in the no longer active microsoft.public.excel.misc and amended it slightly to do the following:

    (1) select column A before starting to search (if your data is in another column, please amend ("A:A") in the 2nd line accordingly

    (2) update the screen view so you can see (and thus click on) the active cell after the letter has been found


    Sub FindFirstChar()
    Columns("A:A").Select
    Dim Cell As Range, firstChar As String
    firstChar = UCase(InputBox("Supply prefix character(s) " _
    & "to find first occurence", "Find First Char(s)", "A"))
    If firstChar = "" Then Exit Sub
    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationManual 'in XL97
    On Error Resume Next 'In case no cells in selection
    For Each Cell In Intersect(Selection, _
    Selection.SpecialCells(xlConstants, xlTextValues))
    If Left(UCase(Cell), Len(firstChar)) = firstChar Then
    Cell.Activate
    GoTo leavemacro
    End If
    Next Cell
    leavemacro:
    Application.Calculation = xlCalculationAutomatic 'in XL97
    Application.ScreenUpdating = True
    End Sub


    Perhaps someone else will also find it useful.

    June

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •