View Single Post
  #8   Report Post  
Dave Peterson
 
Posts: n/a
Default

Give them a macro that does the find for them. Put a button from the Forms
toolbar in Row 1 of your worksheet. Freeze the window so that row 1 is always
visible.

Then assign this macro to that button:

Option Explicit
Sub myFind()
Dim FindWhat As Double
Dim FoundCell As Range
Dim myRng As Range

FindWhat = Application.InputBox("what's the code?", Type:=1)

If FindWhat = 0 Then
Exit Sub
End If

If Selection.Cells.Count = 1 Then
Set myRng = ActiveSheet.Cells
Else
Set myRng = Selection
End If

With myRng
Set FoundCell = .Cells.Find(what:=FindWhat, after:=ActiveCell, _
LookIn:=xlFormulas, lookat:=xlWhole, _
searchorder:=xlByRows, searchdirection:=xlNext)
If FoundCell Is Nothing Then
MsgBox "Not found!"
Else
FoundCell.Select
End If
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

======
My real opinion: Don't sell your users short. If you tell them how excel
works, they'll get smarter and it'll actually help with other workbooks, too.

Smarter users (usually) makes life easier for everyone.


jjjJackieCalifornia wrote:

Hi,
Sorry, but that isn't a realistic solution. This document will be used by a
large number of individuals/departments ... I cannot expect that they will
all be able to "remember" to do this ... however it does work and if it were
just me I would be satisfied with the answer. However, I see it as a bandaid
to my problem. I do appreciate your answer though.
Thank you.

"Dave Peterson" wrote:

Don't use the leading 0 when you're doing your find.

Excel is trying to find the value you type in. And if you look at the formula
bar with your leading 0 zipcode cell selected, you won't see that leading 0.

jjjJackieCalifornia wrote:

I have a large excel worksheet - zip codes, cities, states, area codes ... I
need to be able to sort as well as find. Problem comes in with states that
have zips starting with zero. I can get them to appear correctly as custom or
special, but not able to do cntrl-find and bring up ... I can't believe I
can't figure this out ...


--

Dave Peterson


--

Dave Peterson