![]() |
Search box for text
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 |
Search box for text
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 -- Rick (MVP - Excel) "Allan Grates" wrote in message ... 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 |
Search box for text
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. -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... 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 -- Rick (MVP - Excel) "Allan Grates" wrote in message ... 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 |
Search box for text
I gave you a response, with a macro, in your previous thread dated 23 Dec.
Otto "Allan Grates" wrote in message ... 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 |
All times are GMT +1. The time now is 05:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com