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.
Any help would be very much appreciated.
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Whole List | # of Matches | Filtered Names | ||||||
2 | William | 25 | William | William | |||||
3 | John | John | |||||||
4 | James | James | |||||||
5 | Joseph | Normal dropdown list: | James | Joseph | |||||
6 | Jimmy | Jimmy | |||||||
7 | Kate | Kate | |||||||
8 | Kyle | Kyle | |||||||
9 | Emma | Searchable dropdown list: | Emma | ||||||
10 | sarah | sarah | |||||||
11 | thomas | thomas | |||||||
12 | tom | tom | |||||||
13 | tommy | tommy | |||||||
14 | henry | henry | |||||||
15 | Sophie | Sophie | |||||||
16 | Cherie | Cherie | |||||||
17 | Lucy | Lucy | |||||||
18 | Lacey | Lacey | |||||||
19 | Luke | Luke | |||||||
20 | Jonty | Jonty | |||||||
21 | Kevin | Kevin | |||||||
22 | Natalie | Natalie | |||||||
23 | Darren | Darren | |||||||
24 | Wally | Wally | |||||||
25 | Kerrod | Kerrod | |||||||
26 | Morgan | Morgan | |||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2 | E2 | =COUNTIF(F2:F26,"*?") |
G2 | G2 | =$F$2:INDEX($F$2:$F$26,COUNTIF($F$2:$F$26,"?*")) |
F2:F26 | F2 | =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 | ||
---|---|---|
Name | Refers To | Cells |
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 | ||
---|---|---|
Cell | Allow | Criteria |
D9 | List | =index_dropdown_range1 |
D5 | List | =$A$2:$A$26 |