Solved

Need to add information from one spreadsheet to another using a common key field

Posted on 2011-09-27
6
194 Views
Last Modified: 2012-05-12
We have a MS spreadsheet table (Table 1) with 12 columns of information.  An important piece of information is located on another spreadsheet table (Table 2).  Both tables have a common field (Award Number).  The Award Amount information needs to be placed into Table 2.

I think that I should add a column to Table 1 with the same name as in table two.  I don't know how, but I believe that a command or procedure can be made to compare the two tables using the common field and then copy the Award Amount into Table 1 when a match of the Award number is found.  If necessary, Table 2 can be made to have only two columns (Award Number and Award Amount).

Any assistance that you can give will be appreciated.  
0
Comment
Question by:sherman6789
  • 4
  • 2
6 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 36713800
If you can make Table 2 into two columns with Award Number in the first column and Award Amount in the second then you can use a regular VLOOKUP to pull that information into Table 1

Assume that a specific Award Number is in J2 in table1 then you can use a VLOOKUP like this in K2

=VLOOKUP(J2,Table2,2,0)

You'll get an #N/A error if the J2 Award Number isn't found in the first column

regards, barry
0
 

Author Comment

by:sherman6789
ID: 36713815
Thanks "barryhoudini", I'll try this tonight and respond tomorrow.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 36713850
OK, Note: it doesn't have to be two columns - that's just the simplest form.

As long as the Award Number column is to the left of the Award Amount column you can use VLOOKUP. The lookup value is looked up in the first column of the range you specify and a value is returned from the column indicated by the "column index" - that's the 2 in the above. so your table2 could be 5 columns wide from col F to col J, if Award Number is column F and Award Amount is in J then you would be returning a value from column 5 so the formula would be like this

=VLOOKUP(J2,Table2,5,0)

Excel's help on VLOOKUP is quite short but also reasonably helpful....

regards, barry
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:sherman6789
ID: 36906656
Sorry for the delay.  I had to put this project on hold until Thur (Oct 6, 2011)  I will test and get back then.  Thanks for your assistance barryhoudini:.
0
 

Author Comment

by:sherman6789
ID: 36952122
The combining worked great.  Thanks.
0
 

Author Closing Comment

by:sherman6789
ID: 36952133
I really appreciated you assistance.  Thanks again.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

786 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