View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default "If" function or similar

Use VLOOKUP (). VLOOKUP stands for vertical lookup and search for a value in
the first column of a table array and returns a value in the same row from
another column in the table array. Try the below formulas with a similar data
and try changing the name in Cell C2

C2 = employee name
In D2 try the below formula
=VLOOKUP($C$2,$A$2:$B$10,2,FALSE)

ColA ColB ColC ColD
Employee CostCode QueryNameAnswer
Adam 32 Marie =formula
Marie 24
Francis 33
Joel 34
Susan 26
- -
- -



If this post helps click Yes
---------------
Jacob Skaria


"Roy" wrote:

I have a list of employees and cost codes. I'm wondering how I get a excel to
insert a code from a list of code if another cell equals a certain employee.