Creat dropdown list with two columns

Yaghoub61

New Member
Joined
May 1, 2019
Messages
7
Hi All,

I need a dropdown list with two columns
Column 1 Codes and column 2 names
Can you help me?

Thanks a lot

 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

spydey

Active Member
Joined
Sep 19, 2017
Messages
296
Do you need the actual dropdown list to have two columns, one for codes and one for names?

Or do you need a column in a sheet to have a drop down list for Codes and a different column in the same sheet to have a drop down list for names?

-Spydey
 

Yaghoub61

New Member
Joined
May 1, 2019
Messages
7
I need the actual dropdown list to have two columns, one for codes and one for names in one cell. example cell D1
when the dropdown list open, two columns are shown.
 

spydey

Active Member
Joined
Sep 19, 2017
Messages
296
I need the actual dropdown list to have two columns, one for codes and one for names in one cell. example cell D1
when the dropdown list open, two columns are shown.

So a Data Validation list (drop down menu) has a limit of 1 column ... AFAIK.

But, a Combo Box does allow you to implement more than one column in your dropdown menu.

Here is a link that gives some good insight into using combo boxes.

https://contexturesblog.com/archives/2013/07/30/show-multiple-columns-in-excel-drop-down-list/

Basically, you would need to create a table where the Code - Name relationships are established.

Then your Combo Box drop down menu would give you a list of all the combos you have listed in your table. You then select the one you need.

Just keep in mind, if you have for example 15 codes and 20 names, you could have up to 300 different code/name combinations. You would need to have all 300 combinations in your source table so that they correctly populate into your Combo Box drop down menu.

---------------------------------

Now, if you want to use data validation instead of a combo box, you could do a cascading list, but that would take up to 2 cells for the drop down, instead of the one you wanted, because a Data Validation drop down menu is limited to one column.

You would only need two tables, one of the 15 codes and one of the 20 names. So you are gaining one table, but eliminating all 300 combinations.

Take a look at this link and see if it helps direct you if you want to go down cascading menus.

https://www.ablebits.com/office-addins-blog/2014/09/30/dependent-cascading-dropdown-lists-excel/

-Spydey
 

Watch MrExcel Video

Forum statistics

Threads
1,096,305
Messages
5,449,570
Members
405,572
Latest member
Oberon

This Week's Hot Topics

Top