![]() |
Filter
Hi I have a list of products (approx 27000 rows) with a lot of items duplicated depending on where the stock is located. I want to filter the list to show only selected products and to do this I would like the user to enter the product code in an input dialog box and for the filtered rows to appear as normal (as if autofilter had been used). I would prefer this method as opposed to using the autofilter as there are too many product codes to scroll through to find the required code. Can you please advise the best way to acheive this. Thanks VC -- uplink600 ------------------------------------------------------------------------ uplink600's Profile: http://www.excelforum.com/member.php...fo&userid=9408 View this thread: http://www.excelforum.com/showthread...hreadid=401071 |
Filter
VC,
this worked for me when numbers are in column A and the autofilter is already in place Option Explicit Sub FilterInputBox() Dim Productnumber As String Productnumber = Application.InputBox( _ prompt:="Enter the Product Number", _ Type:=2) Range("A1").AutoFilter Field:=1, Criteria1:=Productnumber End Sub Hope this is useful. Ken Johnson |
All times are GMT +1. The time now is 10:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com