Forum Discussion
Didier67
Oct 06, 2022Copper Contributor
Help needed Dropdown list
Hello, i need help.
I've made a dropdown list in a column. I want the next colomn to adjust with the choice in the dropdown list of the first column.
By example, If i choose a name in my dropdown list, i want the phone number of this name appearing in the next coloumn.
What is it ? A formula or Macro ?
Thanks,
You can use the VLOOKUP or XLOOKUP function for this.
Let's say you have a list on a sheet called Data with names in A2:A50 and phone numbers in D2:D50.
On the sheet you mention, you have a drop down in A2 and down. In B2, enter the formula
=IFERROR(VLOOKUP(A2, Data!$A$2:$D$50, 4, FALSE), "")
or
=XLOOKUP(A2, Data!$A$2:$A$50, Data!$D$2:$D$50, "")
Then fill down as far as you want (if your data are in a table, it will probably propagate the formula automatically).