Alan Judi
Alan Judi

Reputation: 1092

How to select value from a list based on value in a column

I have a column called storage with a drop-down list. The cells in the storage column have a data validation where they must be selected from the list. The list is the range hiddenSheet!$A$3:$I$3.

I have a column (Z) which has the values that need to go in for each field, but they are in string and I don't know how to tell Excel to select the equivalent value from the list.

Here is the Z column.

Column Z with the values to select from list

I simply want to select the value in column Z and place it in the cell in the storage column for each cell without violating the data validation. This is because this needs to be imported into an SQL database.

Upvotes: 0

Views: 1291

Answers (1)

Blake Turner
Blake Turner

Reputation: 151

You could do something like this:

=IF(ISERROR(MATCH([STORAGE_LOC_CD],hiddenSheet!$A$3:$I$3,0))=FALSE,[STORAGE_LOC_CD],"No Match")

You would need to add "No Match" to the data validation list in your hidden sheet, then maybe you can deal with the value "No Match" in a way that doesn't mess up your data.

Upvotes: 1

Related Questions