PDA

View Full Version : Excel formula


mitank
Nov 18, 2008, 10:09 PM
I am using Excel 2007.
I have 2 Sheets.
In first sheet there are 3 coloumns, first one contains the employes number, second coloumn contains the name of employes and third one contains the department he works in.

In the second sheet I have drop down list of the names of employes and the employee number.

Now for Example

When I select from the drop down list and if I select employee "A", and the employee number as "6506", only if these two criteria matches perfectly with sheet 1, I should get the department he works in. If id does not match the cell should be blank.

In this in one department there are many employees working, BUT only if the above 2 criteria matches I should get the department he works in, else the cell should show blank.

Please show with example and if possible downloadable excel sheet.

JBeaucaire
Nov 19, 2008, 05:07 AM
Will this work for you?

ScottGem
Nov 19, 2008, 05:50 AM
This doesn't make sense. An Employee number should be unique. No two employees should have the same number. So there should be no reason to use name as well.

A VLookup formula will pull the department based on the employee number.

JBeaucaire
Nov 19, 2008, 08:09 AM
I was thinking the same thing, but thought I'd give her the answer she asked for first. A straight VLookup will draw all the other pertinent data (Name/Dept/Favorite Color) from the first sheet...