First, I just want to make sure that I understand what you are trying to do
If you are trying to use Excel as some sort of relational database
then you can all but forget it
If you are trying to merge the two sets of data into one so that you
have a new flat file database then, this is easy.
Just use the vlookup function
http://www.bradford.ac.uk/acad/envsci/infostore/Info%20Files/Webs/excel/MoreFunctions/vlookup/vlookup.html
What this will allow you to do is look up one value (your key value in
one column in 1 spreadsheet) in another column in another spreadsheet
and then return the value from another column in the second
spreadsheet.
So, for example, spreadsheet 1 contains data in columns A, B, C & D
Spreadsheet 2 contains data in columns G, H, I, J
The matching key values are held in columns A and column G
Spredsheet 2 has been sorted with column G in ascending order
You want the data that appears in columns H, I and J to appear in
columns E, F & G in spreadsheet1
So, in cell E1 we would enter
=VLOOKUP(A1,[Spredsheet2]Sheet1!$G$1:$J$28,2,FALSE)
where $G$1:$J$28 is the range of our data in spreadsheet 2
We can then copy this formula all the way down comlun E
Then, in cell F1 in spreadsheet 1 we can enter the formula
=VLOOKUP(B1,[Spreadsheet2]Sheet1!$G$1:$J$28,3,FALSE)
Notice here we now reference cell B1 in Spreadsheet 1 and return the
matching value in the 3rd column along in Spreadsheet 2
The word False at the end of the formula forces it to find an exact match
Now, in this way you can easily transfer / merge the data from one
spreadsheet into another one so that you have one flat file database
I have assumed that you only have data in the sheets (hence B1, C1 etc)
If you have field names present or whatever then you will need to
adjust the formula appropriately (i.e. B2, C2 etc)
Now, that was solution 1
Solution 2 presumes that you want to keep your original data in
separate spreadsheets and merge them together, dynamically, into one
new spreadsheet with this 3rd spreadsheet being updated dynaicalyy as
and when data is added to your first 2 spreadsheets.
To do this, in each of your first 2 spreadsheets, you can define a
name for each data range (select the data and then click on Insert |
Name | Define in Excel).
You can then create an odbc link using excel drivers to each separate
spreadsheet and then go into your 4rd spreadsheet and choose Data |
Import External Data | New Database Query.
USing this tool, which I wont go into here, you can then create a
query which links these 2 external data sources together and allows
you to pull back data into your 3rd spreadsheet, laying it up how you
want, applying whichever filters you need and whichever formatting you
desirte.
I say I wint tell you how to do that here, merely because I think
you've got more than $ 5 worth as is and I've basically told you how
to do it so long as you have a rudimentary knowledge of excel and
Microsoft Query.
Anyway, hope this helps
If I have misunderstood your requirements entirely, please clarify
them and I'll suggest something else for you
Best Regards |