Find Field

  • Thread starter Thread starter elliogle
  • Start date Start date
E

elliogle

Hi,

Im just completed a contact list with over 1000 entries! Now instead o
people going in to access it and hitting Control F is there anyway t
add a "find" field to the top? Also how do I add the alphabet (that
can hyperlink to the approate Letter of the contact list) withou
insterting 26 new colums (As this would screw up the list)

Thanks for the help
 
How about making A1 the cell that gets the value to search for?

Then put a button from the forms toolbar in B1 and assign it this macro:

Option Explicit
Sub myFind()
Dim myRng As Range
Dim myFindStr As String
Dim FoundCell As Range

With ActiveSheet
myFindStr = Trim(.Range("a1").Value)
If myFindStr = "" Then
MsgBox "Please type something!"
Exit Sub
End If

Set myRng = .Range("a2", .Cells(.Rows.Count, "A").End(xlUp))
With myRng
Set FoundCell = .Cells.Find(what:=myFindStr & "*", _
after:=.Cells(.Cells.Count), _
LookIn:=xlValues, lookat:=xlWhole, _
MatchCase:=False)
If FoundCell Is Nothing Then
MsgBox "not found"
Else
Application.Goto FoundCell, scroll:=True
End If
End With
End With
End Sub

I'd select A2 and then Window|Freeze panes, so that the button is visible.

And I think I'd just tell them to type F and hit the button to go to the top of
the F's.
 
Back
Top