Solved

Excel 2007 Macro

Posted on 2011-09-19
2
189 Views
Last Modified: 2012-05-12
i have a Excel list of department numbers and their associated supervisors.  I also have an excel spreadsheet that contains employee names and the department they worked in each day.  I need to be able to open the sheet with the employee names and the department they worked in and have the supervisor name added to each line, for each employee.  How do i do this?????
0
Comment
Question by:barnescs
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 36559409
Use a vlookup formula:

=VLOOKUP(B2,'[other workbook.xlsx]Sheet1'!$A$1:$B$1000,2,false)
for example, assuming department ids in column B in the employee workbook, and the source data in columns A and B in the other workbook.
0
 

Author Comment

by:barnescs
ID: 36559437
thanks!!!!  This is what i was needing.  have used VLOOKUP between sheets in a workbook but never between workbooks.  Have a great day!!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now