Today in this blog post I will show you how to create this search suggestion in a drop down list in Excel.
I have a list of Top 20 countries by GDP. I want to create a search suggestion mechanism in a drop-down, which would display the matching options as I type in the search bar. Something as shown below:
To follow along, download the file from here![]()
Here is how you can do this:
(Note that cell B3 is linked to the Combo Box, which means that anything you type in the Combo Box is entered in B3)
=--ISNUMBER(IFERROR(SEARCH($B$3,E3,1),""))This formula returns 1 when the text in the Combo Box is there in the name of the country on the left. For example, if you type UNI, then only the values for United States and United Kingdom are 1 and all the remaining values are 0
=IF(F3=1,COUNTIF($F$3:F3,1),"") This formula returns 1 for the first occurrence where Combo Box text matches the country name, 2 for the second occurrence, 3 for the third and so on. For example, if you type UNI, G3 cell will display 1 as it matches United States, and G9 will display 2 as it matches United Kingdom. Rest of the cells will be blank.
=IFERROR(INDEX($E$3:$E$22,MATCH(ROWS($G$3:G3),$G$3:$G$22,0)),"") This formula stacks all the matching names together without any blank cells in between them.
=$H$3:INDEX($H$3:$H$22,MAX($G$3:$G$22),1)
Thats it!! You are all set with your own Google type Search bar for a drop down. For better look and feel, Cover the cell B3 with the Combo Box and hide all the columns with formula. You can now wow people with this amazing trick.
To follow along, download the file from here![]()