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