Best way to create a searchable drop-down list with auto-complete functionality to cells in a column?

dougmarkham

Active Member
Joined
Jul 19, 2016
Messages
252
Office Version
  1. 365
Platform
  1. Windows
Hi Folks,

I have a time-sheet workbook with two worksheets (ws). In sheet 1 (the time-sheet ws), Column A is "Employee".

Time-sheet worksheet.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Employee[/TD]
[TD]Start time[/TD]
[TD]Finish time[/TD]
[TD]Hours worked[/TD]
[/TR]
[TR]
[TD]Joe Blogs[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]





I wish to be able to start typing a different employee on each row of column A (these employees are temporary workers) and have a drop-down offer me matching results to select.
Worksheet 2 is a master list of temporary employee names on.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Employee List[/TD]
[/TR]
[TR]
[TD]Joe Blogs[/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[/TR]
[TR]
[TD]Andrew Peters[/TD]
[/TR]
[TR]
[TD]Sarah Cook[/TD]
[/TR]
[TR]
[TD]Joseph Belkin[/TD]
[/TR]
</tbody>[/TABLE]










Goal:
a) I envision the user to be able to start typing an employee name,
b) ...as the user is typing, I would like excel to search the master list and offer a set of matching names (a list which shrinks as the user types).
c) I would like the user to be able to select the correct employee name and have that name populate the cell (i.e., to use the down arrow key to select the desired option and press the enter key to populate the cell).

What I've already found from searches:
*There are multiple options to create an ActiveX text box for creating a searchable drop-down; however, these don't offer any way of making every cell in a column of a table to become a searchable-drop-down.
*I've found a few methods using formulas: they tend to offer only the option to click on the drop-down arrow, rather than drop-down list as you type. I'm trying to get away from options which cause the user's hands to leave the keyboard to operate a mouse.

The end goal would be to facilitate the above for existing temporary employees; however, if the employee is a new worker, I am looking to use VBA to transfer the new name from the a cell in column A to the master list via clicking a form control button.

Would anybody be willing to help me find a viable way to do this?

Due to restrictions, I don't think I'll be able to install any add-ins: just VBA, userforms and formulas.

Kind regards,

Doug.
 
Dear Akuini,
Could you make it faster in the sheet has combobox. Because when I move in that sheet, it's delayed.
I'm your fan at the first code. Thank you
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Could you make it faster in the sheet has combobox. Because when I move in that sheet, it's delayed.
1. I can't reproduce the delay behaviour. Are you saying it happened on my sample workbook or on your workbook?
2. Have you tried using the Search deList add-in instead? it's much easier if you use the add-in because you don't need to use macro, just set up data validation in your workbook. Also you'll get several more features. The latest version is Search deList v.2.1:
 
Upvote 0
I tested on sample workbook, use an low computer configuration you can recognize it easier. On my workbook with lot of data row when move to other cell it delayed not smooth as other sheet without code.
if disable "Private Sub Worksheet_SelectionChange(ByVal Target As Range)" (to call combobox) it will smooth. I was tried insert code "Application.EnableEvents = False" after that "True" but nothing bettter.
 
Upvote 0
On my workbook with lot of data row when move to other cell it delayed not smooth as other sheet without code.
1. About how many rows is your data?
2. Do you need data in the combobox list to be sorted? I ask this this because the sorting part could slow down the process.
 
Upvote 0
1. About how many rows is your data?
2. Do you need data in the combobox list to be sorted? I ask this this because the sorting part could slow down the process.
Normal is 5000 rows and data is sorted or unsorted is not important which more smooth is better.
Although I dont turn on combobox and move to whatever cell, its be delayed
 
Upvote 0
Although I dont turn on combobox and move to whatever cell, its be delayed
If you turn off the combobox & it's still delayed then problem should be elsewhere.
Could you show me the code in "Private Sub Worksheet_SelectionChange"?
 
Upvote 0
If you turn off the combobox & it's still delayed then problem should be elsewhere.
Could you show me the code in "Private Sub Worksheet_SelectionChange"?
OK, all code is yours form first time


Full code:






 
Upvote 0
@kobebryant
Could you upload your workbook (without sensitive data) to a sharing site like dropbox.com or google drive?
And then share the link here.
 
Upvote 0
@kobebryant
Could you upload your workbook (without sensitive data) to a sharing site like dropbox.com or google drive?
And then share the link here.
Oh, I have checked my file, it's just delayed a little bit, may be my computer has problem.
Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,226,519
Messages
6,191,527
Members
453,661
Latest member
edfclaya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top