I created an Excel add-in called “Search deList”, to create searchable data validation

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
4,981
Office Version
  1. 365
Platform
  1. Windows
I created an add-in called “Search deList”, and I share it as a freeware.
Its function is to speed up searching in data validation list. In any cell that has data validation (with List type) pressing ALT+RIGHT will open a Userform with a combobox. You can type multiple keywords (separated by a space) in the combobox and the list will be narrowed down as you type.
I’d be appreciate if anyone can test this add-in to find any bugs or just suggesting ideas to improve its functionality.
Also, the code is not protected by password, so if anyone needs to change or add specific feature or behavior then feel free to amend the code, and if you need help for that I’ll help if I can.

How it works:
  • In any cell that has data validation (with List type) pressing ALT+RIGHT will open a Userform with a combobox.
  • Type some keywords to search, separated by a space, e.g "ma la"
  • The list will be narrowed down as you type.
  • The search ignores the keywords order, so the keyword "ma la" would match "Maryland" and "Alabama".
  • You can use up-down arrow to select an item, then hit ENTER, the selected item will be inserted into the cell, and the userform will be closed.
  • You can also use single-click to select an item, then DOUBLE-CLICK inside the box, the selected item will be inserted into the cell, and the userform will be closed.
  • To leave the combobox without inserting its value to the activecell: hit TAB or ESC
  • Numeric values in the list will be treated as text.
  • In the Status Bar you can see how many unique items are found & displayed.
  • You don't need VBA (except if you want to use additional feature as I explain below), so you can save your workbook as .xlsx.
Additional feature :
If you want, you can also activate the userform by double-clicking a cell, but you need VBA to do that. Here’s how:
Copy-paste this code into Thisworkbook code window of your workbook:
VBA Code:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If TypeName(Selection) = "Range" Then
    Dim v
    On Error Resume Next
        v = ActiveCell.Validation.Type
    On Error GoTo 0
    'if activecell has data validation type 3
    'run "Search deList" add-in by doubke-clicking a cell
    If v = 3 Then Cancel = True: Application.Run ("toShow__dheeDAV")
End If
End Sub
Now, in every sheet, double-clicking any cell that has data validation (with List type) will open the Userform.

Image:

image Search deList.jpg


How to use it:
  1. Install the add-in. This article explains how to install an add-in: How to install or uninstall an Excel Add-in - Excel Off The Grid
  2. Open any workbook that has data validation (with list type).
  3. In any cell that has data validation, pressing ALT+RIGHT will open a Userform with a combobox.
  4. Play with it & see how it works.
NOTES:
  • This add-in also works on dependent data validation.
  • It works on large list (I tested it on 100K rows of data).
  • One caveat of using macro is when macro changes/writes something on sheet it will delete Undo Stack, so at that time you can't use UNDO. In this case it happens every time the combobox value is inserted into the active cell.

Search_deList_v1 add-in:
Search_deList_v1

=========================================================================================

Update, 2022-Nov-18:
Search deList v.2.1 + manual.zip, it works on Excel 2007 or later:

Search deList v.365.1 + manual.zip, it works on Excel 365 or later

This new version has some additional features, some of them:
Several ways to search, like using AND or OR or LIKE operator , with or without keyword order.
Sort the list by original order or ascending order.
Widen or shorten the combobox width at run time.
Insert multiple entries into the cell.

=======================================================================================

Regards,
Akuini
 
Last edited by a moderator:
There was a bug in this new version, regarding inserting multiple entries as described in post #78.
So, here's the revised version:
Update 2022-Nov-18

Search deList v.2.1 + manual.zip, it works on Excel 2007 or later

Search deList v.365.1 + manual.zip, it works on Excel 365 or later

Full description about the new version is on post #68 and in the manual.

The new version has some additional features, some of them:
  • Several ways to search, like using AND or OR or LIKE operator , with or without keyword order.
  • Sort the list by original order or ascending order.
  • Widen or shorten the combobox width at run time.
  • Insert multiple entries into the cell.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
You're welcome, glad to help & thanks for the feedback.:)
Akuini, very cool add-in tool. I was wondering if there was a way to utilize this to more quickly select Times of Day within a dropdown validation? It appears the search shows the values instead of the times. I want to select from my validation based on the text, but then the value of the cell is later used for a calculation.
5:00 AM​
5:15 AM​
5:30 AM​
5:45 AM​
6:00 AM​
6:15 AM​
6:30 AM​
6:45 AM​
7:00 AM​
7:15 AM​
7:30 AM​
7:45 AM​
8:00 AM​
8:15 AM​
8:30 AM​
8:45 AM​
9:00 AM​
9:15 AM​
9:30 AM​
9:45 AM​
10:00 AM​
10:15 AM​
10:30 AM​
10:45 AM​
11:00 AM​
11:15 AM​
11:30 AM​
11:45 AM​
12:00 PM​
12:15 PM​
12:30 PM​
12:45 PM​
1:00 PM​
1:15 PM​
1:30 PM​
1:45 PM​
2:00 PM​
2:15 PM​
2:30 PM​
2:45 PM​
3:00 PM​
3:15 PM​
3:30 PM​
3:45 PM​
4:00 PM​
4:15 PM​
4:30 PM​
4:45 PM​
5:00 PM​
5:15 PM​
5:30 PM​
5:45 PM​
6:00 PM​
6:15 PM​
6:30 PM​
6:45 PM​
7:00 PM​
7:15 PM​
7:30 PM​
7:45 PM​
8:00 PM​
8:15 PM​
8:30 PM​
8:45 PM​
9:00 PM​
9:15 PM​
9:30 PM​
9:45 PM​
10:00 PM​
10:15 PM​
10:30 PM​
10:45 PM​
11:00 PM​
11:15 PM​
11:30 PM​
11:45 PM​
12:00 AM​



1670256590157.png


1670256622394.png
 
Upvote 0
@InfinityC, welcome to the Forum.
There are 2 issues regarding date or time value, it might change when loaded to combobox & when sent back to cell. That's because the value of the combobox is just text, it doesn't have a date/time format.
I haven't found a way around this problem yet, I'll let you know if I do.

I shared a new version of this add-in, i.e "Search_deList_v2.1", please check post #81.
 
Upvote 0
Thanks Akuini! Again very cool tool. Appreciate the response and other posts in this forum.
 
Upvote 0
Akuini, very cool add-in tool. I was wondering if there was a way to utilize this to more quickly select Times of Day within a dropdown validation? It appears the search shows the values instead of the times. I want to select from my validation based on the text, but then the value of the cell is later used for a calculation.
I've amended the code to tackle the the time problem as you described.

Time problem
If the cell value is time, then in the combobox it will be displayed as number instead of time.
To resolve this problem:
Press F6 to load the list as text. Pick an entry then hit enter (or click).
Caution:
If you load the list as text, then you need to be aware of this kind of problem:
For example:
A cell is formatted as “h.mm AM/PM”, the value displayed in the formula bar is 11.45.33, in the cell it is displayed as 11.45 AM (without the second part, which is 33), when loaded as text in the combobox it’s displayed as 11.45 AM, the second part will be removed, so when it’s sent back to a cell, the value (as displayed in the formula bar) will be 11.45.00 instead of 11.45.33. So, the value is actually changed.

Of course if the second part of the data is actually "00" then that won't be a problem.

Here's the new version, updated 11-Dec-2022.
Search deList v.2.2 + manual.zip

Please try & provide feedback.
 
Upvote 0
So I have to use F9 then ESC intead of enter?
Sorry, in the manual I actually forgot to explain how to do it properly.🙏
You're right, to insert multiple entries, hit F9 multiple times as needed and then finish with Esc instead of Enter.
And another way: hit F9 multiple times as needed and then hit Delete (to empty the combobox) then hit Enter.
 
Upvote 0
Hello. We recently migrated files from a shortcut-accessed google drive sharing setup to a true google shared drive. Don't ask why we had it set up as a shortcut-accessed drive sharing before.

I keep my search-deList file in a particular folder in the shared drives. When I open excel, excel is looking for the file in the old shortcut folder. Each time I go into File - Options - Add-Ins and remove that add-in (and the reference to the shortcut folder) and then add the "new" add-in and reference the new location, it works for the time I have excel open but defaults to the old shortcut folder every time I open excel again. I can't seem to figure out how to delete the reference to the older file and lock in the reference to the new file. Have you dealt with this issue before?

Still loving the add-in!

Craig
 
Upvote 0
I keep my search-deList file in a particular folder in the shared drives. When I open excel, excel is looking for the file in the old shortcut folder. Each time I go into File - Options - Add-Ins and remove that add-in (and the reference to the shortcut folder) and then add the "new" add-in and reference the new location, it works for the time I have excel open but defaults to the old shortcut folder every time I open excel again. I can't seem to figure out how to delete the reference to the older file and lock in the reference to the new file. Have you dealt with this issue before?
Sorry, I haven't tested this add-in on shared drives.
Do you have any other add-ins? and are they facing the same problem? If yes then this problem is not only related to this add-in so it would be better if you start a new thread (in the Excel Questions section) to post this question.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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