Forum

Notifications
Clear all

Drop down list with wildcard?

4 Posts
2 Users
0 Reactions
214 Views
(@darkwing1711)
Posts: 31
Trusted Member
Topic starter
 

I am looking to make a drop down list using a table as the source using a wildcard.  For example: Based on the table below, I want a drop down to list only Companies with "IL" in the cell.

Company Code
IL123
IN123
OH123
IL456
OH456
IL789

 

So the drop down would list below

IL
IL123
IL456
IL789

Is this possible?  Thanks in advance!

 
Posted : 24/02/2022 6:58 pm
(@questvba)
Posts: 125
Estimable Member
 

Hi Kenneth,

Here is a solution without VBA and only with formulas ; Drop down list et Named area.

BR,

Lionel

 
Posted : 25/02/2022 2:55 am
(@darkwing1711)
Posts: 31
Trusted Member
Topic starter
 

Thank you so much!  This helps a lot!

I just had to translate the functions, I didn't know it was a different language until I looked it up :-p

It looks like you had your data source sorted, I was hoping I didn't have to do that.  But this is probably be the easiest way.  I can definitely work with this though!

So just in case someone wanted a English translation for the Formula.

NOTE!  I was using a table as the source, so I didn't need the Named Range as in the attachment.  Table2[Company Code] is what you would need to change to a regular range.

=OFFSET(Table2[Company Code],MATCH($K$1 &"*",Table2[Company Code],0)-1,,COUNTIF(Table2[Company Code],$K$1 &"*"))

 

Again, thank you very much Lionel!

 
Posted : 25/02/2022 12:43 pm
(@questvba)
Posts: 125
Estimable Member
 

Good job Kenneth !

Sorry for the French vesrion of formulas.

BR,

Lionel

 
Posted : 26/02/2022 1:51 am
Share: