Nov 10 2022 07:21 PM
Can I create a list of codes so that when you choose the code from the drop-down list, you get a definition of the code?
For example:
Code Definition
AAT Arranging for assistive technology
What steps do I need to take?
Thank you.
Nov 10 2022 10:30 PM
Hi agkrolak,
First you will need to create a list of all your Code-Definition pairs. This can be on a separate sheet.
Next I would declare each column of that list as a Named Range (call one Codes and the other Definitions).
Now, for your Code drop-down cell, go to Data/Data Validation, and in the Allow drop-down, select List, then in Source put =Codes.
For the Definiton cell, use a lookup function like XLOOKUP(), or INDEX(MATCH()). The function call will be something like this (if your Code drop-down is cell A1).
=XLOOKUP(A1,Codes,Definitions,"Code not found",0)
The "Code not found" error should actually be completely redundant, because your dropdown list is defined on the same data as the lookup, so in theory it can't fail! But I always like to put in a fail message... force of habit!
Hope that works for you!
Colin