Search Box in Excel

Aleks Roth

New Member
Joined
Sep 10, 2016
Messages
4
<body id="cke_pastebin" style="position: ********* ***** **** ******* **** ******** **** ********** ******* ****** -100****">

<tbody style="margin: **** padding: **** border: ****">
[TD="class: votecell"]
-3down votefavorite
[/TD]
[TD="class: postcell"]I would like to add a search box to worksheet 1 in my workbook of 2 sheets. Table with data stored on the sheet 2. I would like the option of entering city into the search box and either hitting enter or clicking a "go" button to search. If the search is successful, ideally show country equally city. When it comes to VBA, I am a very basic user, so I would need the code written out for me and I need to know exactly where to put it and how to get the search box to appear. I realize I may be asking a question already asked and answered in a different thread so I apologize about that.
Example:
Country City
Germany Frankfurt
Germany Jena
Germany Stutgart
France Paris
France Reims
France Rouen
result:
search request: Frankfurt
result: Germany
or
search request:Paris
result:France


[/TD]

</tbody>
</body>

<tbody style="margin: **** padding: **** border: ****">
[TD="class: votecell"]

down votefavorite
[/TD]
[TD="class: postcell"]I would like to add a search box to worksheet 1 in my workbook of 2 sheets. Table with data stored on the sheet 2. I would like the option of entering city into the search box and either hitting enter or clicking a "go" button to search. If the search is successful, ideally show country equally city. When it comes to VBA, I am a very basic user, so I would need the code written out for me and I need to know exactly where to put it and how to get the search box to appear. I realize I may be asking a question already asked and answered in a different thread so I apologize about that.
Example:
Country City
Germany Frankfurt
Germany Jena
Germany Stutgart
France Paris
France Reims
France Rouen
result:
search request: Frankfurt
result: Germany
or
search request:Paris
result:France


[/TD]

</tbody>
 
This macros is working, but I want to display results from a range D2:D82 in text box without automatically redirection user to the located text
Sub clik()
Res = InputBox("Who are you looking for?")
Set Rng = Worksheets("level2").Range("B2:B82") '<< The Sheet Name and Range to Search
With Rng
Set MyChoice = .Find(What:=Res)
If Not MyChoice Is Nothing Then
Application.Goto MyChoice
Else: GoTo ExitMyChoice
End If
End With
Exit Sub
ExitMyChoice:
MsgBox "Could Not Find " & Res
End Sub
 
Upvote 0

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