#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter PivotTable dropdown items to match report filter Catherine D Excel Discussion (Misc queries) 1 August 16th 08 12:12 AM
Copy only visible cells after filter is applied/ sum after filter MAM Excel Worksheet Functions 0 April 9th 08 04:09 AM
filter: how to print filter list options in dropdown box help please Excel Discussion (Misc queries) 2 October 17th 07 01:53 AM
Excel auto filter doesn't recoginize case - won't filter AA from A Mikey Excel Discussion (Misc queries) 1 September 29th 05 08:18 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 12:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"