View Single Post
  #3  
Old September 10th, 2006, 03:19 PM posted to microsoft.public.excel.misc
Jim May
external usenet poster
 
Posts: 64
Default Quick search required

Place a Command button at the top of your sheet (Using the Forms
control)
And assign the button to this Standard Module Macro.

So after you enter your letter of choice into A1, then click on the
button
The cursor should jump to the first instance of your A1 - letter
content;
HTH

Jim May

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/10/2006 by Jim May
'
Dim fchar As String
fchar = Range("A1") & "*"
'
Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row).Find(What:=fchar,
After:=ActiveCell, LookIn:=xlValues, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
End Sub




"cashman" wrote in message
oups.com:

I have a database of 5,500 surnames and associated data in excel [yes,
should probably use Access!]. It is always a task to quickly jump to
each entry using the "find" function - typing in the relative surname
will find the relative entry.

However, is there a way to have excel jump to just the change in in the
first letter of a group of surnames starting with the same alpha
character. I would envisage putting a control box or similar in the top
of the surname column [A1] . i.e just type in the letter "B" and the
cursor will jump to the first surname in column A containing the first
surname containg ithe letter B

In this instance, typing in the letter "B"in cell A1 would immediately
jump the cursor to cell
A4, typing in E in cell A1, would jump the cursor to A7 and so on
A
1 B
2 Aamic
3 Aauld
4 Baby
5 Cry
6 Deep
7 Ease
8 Foot

Thanks in advance
Cashman