Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roy Roy is offline
external usenet poster
 
Posts: 53
Default "If" function or similar

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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default "If" function or similar

Roy,

Without knowing your data layout a precise answer is diffcult but almost
certainly what you want is Vlookup something like this:-

=VLOOKUP(E1,A1:B20,2,FALSE)

Whe- E1 is the employee in question

A1 - B20 is a list of employees (Col A) and cost codes (Col B)

Mike

"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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default "If" function or similar

See VLOOKUP() in Excel Help.
--
Gary''s Student - gsnu200902


"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.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default "If" function or similar

Suppose you had the list of employees in sheet1 column A in rows 1 to 20, and
their codes in sheet1 column B, rows 1 to 20.

If in Sheet 2, you had an employee name in A1 then the following formula in
B1 would return their code:

=VLOOKUP(A1,Sheet1!A1:B20,2,false)

Is that what you mean?

Sam

"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.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default "If" function or similar

You would normally use VLOOKUP for this. Suppose your list of
Employees and codes is in Sheet1, columns A and B, and in Sheet2 A2
you enter an employee name, Then you can put this formula in B2 of
Sheet2:

=VLOOKUP(A2,Sheet1!A:B,2,0)

Hope this helps.

Pete

On Sep 8, 2:07*pm, 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.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default "If" function or similar

Roy,

The consensus seems to be VLOOKUP...


"Pete_UK" wrote:

You would normally use VLOOKUP for this. Suppose your list of
Employees and codes is in Sheet1, columns A and B, and in Sheet2 A2
you enter an employee name, Then you can put this formula in B2 of
Sheet2:

=VLOOKUP(A2,Sheet1!A:B,2,0)

Hope this helps.

Pete

On Sep 8, 2:07 pm, 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.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default "If" function or similar

Until the OP tells us the columns of data are the opposite way around to that
which we have all assumed and it becomes a left lookup :)

Mike

"Sam Wilson" wrote:

Roy,

The consensus seems to be VLOOKUP...


"Pete_UK" wrote:

You would normally use VLOOKUP for this. Suppose your list of
Employees and codes is in Sheet1, columns A and B, and in Sheet2 A2
you enter an employee name, Then you can put this formula in B2 of
Sheet2:

=VLOOKUP(A2,Sheet1!A:B,2,0)

Hope this helps.

Pete

On Sep 8, 2:07 pm, 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Similar Problem as "Multiple Matched Lines" jello523 Excel Discussion (Misc queries) 0 November 21st 06 09:40 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"