merging 3 spreadsheets into one based upon a single common data field

  • Thread starter Thread starter xchosen
  • Start date Start date
X

xchosen

OK I hope you guys can help me out. Here is the scenario. I have 3
spreadsheets. The main spreadsheet I working with has 500 lines with a
unique number string. The next two spreadsheets have about 12000 lines
but also contain the same unique string as the first spreadsheet. I
want to search the 2nd and 3rd spreadsheet using the first spreadsheets
unique id number and then take the information from the 2nd and 3rd
spreadsheet and then merge it into the first. Does that make since?
Any help would be great.
 
You need to use VLOOKUP. Assume the unique number filed is column A in
all sheets, and let's assume the sheets are called Sheet1, Sheet2 and
Sheet3.

In the first sheet (the one with 500 lines), you can enter a formula
like this in, say, D1:

=VLOOKUP(A1,Sheet2!A$1:F$12000,3,0)

This will search through the data in Sheet2 looking for an exact match
with the item in A1 of Sheet1. If a match is found, then the data from
column C of Sheet2 is returned. Change the references to suit your
situation, then copy the formula down.

Hope this helps.

Pete
 
Thanks an enormous amount. I was able to get what I wanted but I wen
about it in a very brute force way. I copied all xls documents to tex
files then created a .bat file that searched each source line. It the
created 528 separate files with the infomation I needed. I then copie
all those files back into one .txt file. I then imported it back int
xls. It work but It was such a pain. I knew there had to be a
efficient way to go about what I wanted. Big thanks
 

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