Solved

How can I have Excel pull up a value in another workbook based on text input?

Posted on 2011-02-25
4
216 Views
Last Modified: 2012-05-11
I have a workbook with two columns, one with a persons last name, and one with a number associated with them:
Col. A    Col. B
Adams  10
Baker    20
Charlie  30

I want to link new workbooks to this master document, so when I type a name (like Baker) into a cell, the cell to the right of that autopopulates with the number value from the master workbook.

How do I do this?

Thanks!
0
Comment
Question by:ssittig
4 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 400 total points
ID: 34986015
Let's say you have two Workbooks in the drive C:\ "Book1" and "Book2":
Book1 (master document):
Col. A    Col. B
Adams  10
Baker    20
Charlie  30

Book2:
colA
Baker

in the next column (ColB) put:
=IF(ISERROR(LOOKUP(A1,'C:\[Book1.xls]Sheet1'!$A$1:$B$3)),"",LOOKUP(A1,'C:\[Book1.xls]Sheet1'!$A$1:$B$3))
Note I just selected the first three rows that is why it is $A$1:$B$3 if you want to cover more rows change this number to the the last item you might have or set it to cover the entire column:
=IF(ISERROR(LOOKUP(A1,'C:\[Book1.xls]Sheet1'!A:B)),"",LOOKUP(A1,'C:\[Book1.xls]Sheet1'!A:B))
And copy down the column.
0
 
LVL 30

Assisted Solution

by:SiddharthRout
SiddharthRout earned 75 total points
ID: 34986088
@ssittig: Since you are using Excel 2007

You may also use this code in Cell B2 of Book2.

=IfError(VLookup(A1,'C:\[Book1.xls]Sheet1'!$A$1:$B$100),2,0),"")

Sid
0
 
LVL 23

Assisted Solution

by:Michael74
Michael74 earned 25 total points
ID: 34986112
@ssitig

Sid and Jimyx have provided working formulas for you but if you are interested in learning more an referencing other workbooks have a look at this link
http://www.404techsupport.com/2009/11/04/referencing-cells-in-excel/

This link shows the vlookup function which can be extremely handy and as you can see in the answers above is the function that is used to solve your problem
http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx

Michael
0
 
LVL 1

Author Closing Comment

by:ssittig
ID: 34988649
Thank you!!! I'll give that a try!
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

Title # Comments Views Activity
How to change associated macro so it asks for folder rather than using hardcoded folder? 4 34
Compile Error 7 40
Excel Score Formula 5 47
Automating Excel Weekly Report 13 54
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

911 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

21 Experts available now in Live!

Get 1:1 Help Now