Search box for text

A

Allan Grates

I'm looking for a solution for an item search box for an inventory. I have a
spreadsheet that I need to find "Name of product" and scroll it up to the
bottom of my frozen pane. I've searched the discussions forum and tried
several formulas, non have worked for me.
In my frozen panes view, I'm looking to have a search box to type an item
name in and have excel scroll it up to the bottom of the frozen pane. The
item names are in column "D".
Any takers?????
Thanks, Allan Grates
 
R

Rick Rothstein

You are not going to be able to do this with formulas since formulas cannot
take any actions (such as scrolling the worksheet), you will need VB for
this. Here is a macro to attach to the button I assume you will have to let
the user be able to signal that they are done typing...

Sub FindAndScrollToItem()
Dim ItemToFind As String
ItemToFind = "Name of product"
ActiveWindow.ScrollRow = Columns("D").Find(ItemToFind, _
After:=Cells(Rows.Count, "D"), _
LookAt:=xlWhole, SearchDirection:=xlNext, _
MatchCase:=False).Row
End Sub
 
R

Rick Rothstein

Of course, you should replace this line...

ItemToFind = "Name of product"

with one that pulls the text out of your TextBox. If you tell us where you
got the TextBox from (either the Controls Toolbox toolbar or the Drawing
toolbar) and what the name of the TextBox is, then we could give you the
actual line of code to use.
 
O

Otto Moehrbach

I gave you a response, with a macro, in your previous thread dated 23 Dec.
Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top