Conditional copy of cells with corresponding values

Solved/Closed
DR999 - 3 Nov 2015 à 16:23
 DR999 - 5 Nov 2015 à 08:58
I have a list of variables in column A. I also have their values in column B. I then have column C, which has variables from the list in column A but they are randomly repeating. My task is to copy cells of values from column B into column D to fill in values for the variables in column C. As it should be obvious, the values in column D have to correspond to the variables in column C.

Example:

Column A
Bread
Milk
Cheese

Column B
1.00
1.20
2.00

Column C
Milk
Cheese
Cheese
Milk
Bread

So, column D has to have values of the variables in column C and these values have to correspond to the values in column B. Is it possible to automatically find if a cell in column D has the text of any variables in column A, and, if it does, the corresponding value in column B is copied in the cell in column D?

Thank you!
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
3 Nov 2015 à 19:33
have a look at VLOOKUP formula
Thanks a lot for the tip!