I've lost my formula for merging data ?


Posted by Gavin Williams on January 16, 2001 12:59 AM

Hi,

Does anyone know the formula for the following:

Spreadsheet A has 50 product codes

Spreadsheet B has 100 product codes, but also quantities against the product codes.

As the products in A are also in B, Im looking for the formula/macro that will easily allow me to add the quantites to the correct product code in spreadsheet A.

I used to know how to do this, but I've lost the original spreadsheet I previously had it in!

Can anyone help?

Gavin

Posted by Aladin Akyurek on January 16, 2001 2:39 AM

Select cells for products and quantities and name it PRODUCTS via the Name Box. Sort PRODUCTS on product codes.

Go to spreadsheet A and enter in the cell next to the first entry, which is in say A1:

B1 =VLOOKUP(A1,B.xls!PRODUCTS,2,0)

Copy down this formula as far as needed.

Aladin



Posted by Gavin Williams on January 16, 2001 10:30 AM

Hi Aladin,

You are a Gentlemen and a Scholar.
This wasnt actually the way I originally did it, your method is miles easier.

Thank You