Reputation: 1387
I have an Excel workbook where on one sheet I have two columns of data.
For example:
ColumnA ColumnB
1000 DescriptionFor1000
1001 DescriptionFor1001
1002 DescriptionFor1002
1003 DescriptionFor1003
...
On another sheet, I have one column set with Data Validation so that each cell value must equal a value from ColumnA above (ex. 1000 or 1001 or 1002 etc).
When the user selects a value from the drop down list of ColumnA values, I would like the column next to it be autopopulated with ColumnB value from above.
For example, if the user selected 1001, the cell right next to it would automatically fill with "DescriptionFor1001"
I do not have code here because there is none to display (all controlled through Excel so far). Is there a way to do this? I do not mind writing VBA code if need be.
Upvotes: 0
Views: 996
Reputation: 5770
A VLOOKUP
formula should do the trick. Let's assume the dropdown in in cell A1, and the data for the dropdown is in Sheet2!A1:B10
, the formula would be:
=VLOOKUP(A1,Sheet2!A1:B10,2,FALSE)
Upvotes: 0