combining 2 spreadsheats

  • Thread starter Thread starter rodz
  • Start date Start date
R

rodz

When i pull data from a source I can only bring it out in 2 csv files
which I then save into excel format. It mostly contains data allthough
the information can be tied up with a unique reference number that
matches both legs on each spreadsheet, someone said i can write a
querie to filter out the info how do i do this and is this the only way
it can work?
 
You end up with two worksheets?
And you want to combine different data based on a common key?

It sounds like a perfect job for =vlookup().

Say your worksheets are sheet1 and sheet2. And your key data is in column A (of
both sheets). And you want to merge data from sheet2 (say columns B:D) into a
new columns on sheet1.

You can put this formula in a new column of sheet1:

=vlookup(a1,sheet2!A:D,2,false)
to return column B (that's the 2 portion)
=vlookup(a1,sheet2!A:D,3,false)
and
=vlookup(a1,sheet2!A:D,4,false)
will get column C and D.

Now to hide mismatches, you can modify each of the formulas:
=if(iserror(vlookup(a1,sheet2!A:D,2,false)),"",vlookup(a1,sheet2!A:D,2,false))
 
Back
Top