Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Drop-Down List Search Capability

I have a long data validation list of over 500 items. Is there a way to
program it so that if you type in the first couple of letters of an item in
the list it jumps to that area of the list?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Drop-Down List Search Capability

you can do it with a userform .... and with 500 items you'd be surprised at
how fast it is!

demo

in this demo, add a Userform with two buttons, a textbox and a listbox ...
leave the default names
in a sheet, put 500 names in column D
the item selected using the listbox will be placed in cell A1 when the
sencond button is clicked

here is the userform code:

Option Explicit
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
If ListBox1.ListIndex = -1 Then Exit Sub
Range("A1") = ListBox1.Value
Unload Me
End Sub
Private Sub TextBox1_Change()
loadData
End Sub
Private Sub UserForm_Initialize()
loadData
End Sub
Sub loadData()
Dim index As Long
Dim text As String
ListBox1.Clear
For index = 1 To 500
text = Cells(index, "D")
If text Like TextBox1.text & "*" Then
ListBox1.AddItem text
End If
Next
End Sub



download from he
http://www.xl-expert.com/listbox_with_filter.htm




"aehaver" wrote in message
...
I have a long data validation list of over 500 items. Is there a way to
program it so that if you type in the first couple of letters of an item
in
the list it jumps to that area of the list?


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
Search Capability Dreiding Excel Discussion (Misc queries) 1 April 23rd 10 09:32 PM
Advanced Search Capability Fred Holmes Excel Discussion (Misc queries) 3 March 11th 10 09:02 PM
Multiple selection (range or individual) capability in a drop down list [email protected] Excel Programming 0 September 17th 07 08:56 PM
How to allow multiple selection capability in excel drop down lis. WritingAcademy Excel Discussion (Misc queries) 1 March 9th 06 12:27 AM
search with drop down list BigPig Excel Worksheet Functions 4 December 14th 04 03:57 AM


All times are GMT +1. The time now is 02:58 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"