need more exact search

reddcannon

Board Regular
Joined
Aug 11, 2011
Messages
118
The code below came from you wonderful people at Mr. Excel, however I have one slight problem. If for example I push the button to search for 75 it goes to 275 which is hundreds of rows before 75. And no I cannot change the sort order of part numbers, because they are actually done by name and must remain in the order I have them. Is there a way to get a more accurate search out of this code

Private Sub CommandButton2_Click()
Dim searchthis As String, Found As Range
Me.Unprotect Password:="123"
searchthis = InputBox("Type Name or Number.", "Property Search")
Set Found = Range("A:A,C:C").Find(What:=searchthis, LookIn:=xlFormulas, LookAt:=xlPart)
If Not Found Is Nothing Then Found.Select
Me.Protect Password:="123"
End Sub
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Thanks so much, I have sent back a thank you everytime, I am new to this site and cannot find where to go to say problem resolved etc. Can you guide me.
 
Upvote 0
Thanks so much, I have sent back a thank you everytime, I am new to this site and cannot find where to go to say problem resolved etc. Can you guide me.
That's my strap line, it appears on all of my posts.
It's under thread tools I think, but not visible in Firefox, but visible in IE.
 
Upvote 0
Oh, ok thanks so much, yes I tried that under Thread tools and all that is there is 3 choices.
Show printable version
Email this page
Unsubscribe from this thread.

You folks are amazing. In fact after the first time I was helped I wrote back asking if I can send a donation, pay for the help etc and they said no. God Bless you folks
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top