Help with searchable data validation list

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I have a nice working searchable data validation list. I'd like a little bit of code that clears everything in D9 (the searchable cell) every time the dropdown arrow is selected. The aim is for the search function to be available for users but also so the list functions just like a normal dropdown. Hoping that makes sense.

Any help would be very much appreciated.

Book1
ABCDEFG
1Whole List# of MatchesFiltered Names
2William25WilliamWilliam
3JohnJohn
4JamesJames
5JosephNormal dropdown list:JamesJoseph
6JimmyJimmy
7KateKate
8KyleKyle
9EmmaSearchable dropdown list:Emma
10sarahsarah
11thomasthomas
12tomtom
13tommytommy
14henryhenry
15SophieSophie
16CherieCherie
17LucyLucy
18LaceyLacey
19LukeLuke
20JontyJonty
21KevinKevin
22NatalieNatalie
23DarrenDarren
24WallyWally
25KerrodKerrod
26MorganMorgan
Sheet1
Cell Formulas
RangeFormula
E2E2=COUNTIF(F2:F26,"*?")
G2G2=$F$2:INDEX($F$2:$F$26,COUNTIF($F$2:$F$26,"?*"))
F2:F26F2=IFERROR(INDEX($A$2:$A$26,SMALL(IF(ISNUMBER(SEARCH($D$9,$A$2:$A$26)),ROW($A$2:$A$26)-ROW($A$2)+1),ROWS($F$2:F2))),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
index_dropdown_range1=Sheet1!$F$2:INDEX(Sheet1!$F$2:$F$26,COUNTIF(Sheet1!$F$2:$F$26,"?*"))F2:F26, E2, G2
Cells with Data Validation
CellAllowCriteria
D9List=index_dropdown_range1
D5List=$A$2:$A$26
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Place an ActiveX combobox and use this code behind the combobox.

VBA Code:
Private Sub ComboBox1_Change()
 With ComboBox1
   .List = Filter(Application.Transpose(Sheets(1).Range("a1").CurrentRegion.Offset(1)), .Value, True, vbTextCompare)
   .DropDown
 End With
End Sub


Put the matchentry property on 2 (MatchEntryNone)
 
Last edited:
Upvote 0
Thanks for the suggestion. Think I'd rather just a tiny bit of code to clear the cell upon clicking, if that's possible.
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

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