Skip to main content
improve answer per OP's new requirements
Source Link
doubleunary
  • 15.7k
  • 9
  • 23
  • 59

The drop-down list cell will always show the value you selected, but you can look up the ID in a nearby cell with something like this:

=iferror( vlookup(D2, { DropdownLists!B2:B, DropdownLists!A2:A }, 2, false) )

...where D2 is the drop-down list cell and DropdownLists!A2:B is the range where you have the IDs and names.

Alternatively, use an array formula like this:

=arrayformula( iferror( vlookup(B2:B, { 'Data Validation table'!B2:B, 'Data Validation table'!A2:A }, 2, false) ) )

This formula will fill the whole column automatically.

See your sample spreadsheet.

The drop-down list cell will always show the value you selected, but you can look up the ID in a nearby cell with something like this:

=iferror( vlookup(D2, { DropdownLists!B2:B, DropdownLists!A2:A }, 2, false) )

...where D2 is the drop-down list cell and DropdownLists!A2:B is the range where you have the IDs and names.

The drop-down list cell will always show the value you selected, but you can look up the ID in a nearby cell with something like this:

=iferror( vlookup(D2, { DropdownLists!B2:B, DropdownLists!A2:A }, 2, false) )

...where D2 is the drop-down list cell and DropdownLists!A2:B is the range where you have the IDs and names.

Alternatively, use an array formula like this:

=arrayformula( iferror( vlookup(B2:B, { 'Data Validation table'!B2:B, 'Data Validation table'!A2:A }, 2, false) ) )

This formula will fill the whole column automatically.

See your sample spreadsheet.

Source Link
doubleunary
  • 15.7k
  • 9
  • 23
  • 59

The drop-down list cell will always show the value you selected, but you can look up the ID in a nearby cell with something like this:

=iferror( vlookup(D2, { DropdownLists!B2:B, DropdownLists!A2:A }, 2, false) )

...where D2 is the drop-down list cell and DropdownLists!A2:B is the range where you have the IDs and names.