Formula for finding data from 2 worksheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi; I am trying to find a formula that compares the data from one worksheet
to another. If the data matches I want data from another column on the second
page.

Example
1st Worksheet
Department
 
Sorry I didn't get to complete:

Example:

worksheet 1 worksheet 2
Name of deptments VP | Manager|
Department | Employee

I would like to be able to enter a formula that in worksheet 1 would put the
manager or the employees of the department next to the department.
 
Does anything match on the two worksheets? Do both worksheets have the
various different departments on them or do they both contain completly
separate information with nothing that matches?
 
They both have the data "department" and I want to find the manager or
employee for that department.
 
Then it is easy. You will need to do a vlookup. Run a search for vlookup on
help and it should tell you everything you need to know. If you still need
help reply to this and we'll figure it out. Thanks!

Here is my example:
Worksheet1
Department Employee
HR
Accounting
 
Let's say that it is in Worksheet1 that you need to put the manager name. In
the cell where you want to pull in the name you will type this:
=vlookup(click on the first cell in Worksheet1 that has a department name
because this is what excel is going to use as your matching criteria, then
click over to worksheet2 and highlight from A1 to the end of the worksheet,
on worksheet2 figure out what column the manager name is in and put that
numeric value in here,false) so it should look something like this:
=vlookup(A1,Worksheet2!A1:Z4,5,false)
You can also use the formula builder under the insert option at the top and
then function and find the vlookup and it will help walk you through it.
Now you must make sure that the department column is before the manager or
employee name or it will not work.
 
I did the vlookup like you said and it is not working. also what I am looking
for is if say column 5 data matches the data from worksheet one then I want
to use the info from column 3 on worksheet 2.
 
What is not working? If you want help you need to provide the details, post
your formula, describe what you excepted and what you got.
 
The way a vlookup works is it takes whatever you put after the first open
paranthesis (i.e. =vlookup(A1) so it takes whatever is in A1, in your case
the department, and goes over to your second sheet or workbook and finds that
same value from the range that you set in the formula (Worksheet2!A1:Z25) and
then whatever it finds in the column that you list (,5,) it pulls back over
into the cell where the formula is written. You just have to make sure with
a vlookup that your range that is set in the formula starts with the matching
criteria, in this case your department, so if your department starts in
column c when you click over to worksheet2 to set your range it will start at
c1 and go to the end of the workbook and column a and b will be ignored, and
that this matching criteria comes before the information that you want to
pull over, in this case the manager or employee. I wish we could attach
examples to this thing, would make it so much easier!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top