Use the vlookup function to find matching ID's.

"Bhupinder Rayat" wrote:

> Hi all,
>
> I have two sets of data, one set on sheet1 and the other on sheet2, both
> containing the same ID numbers and the same fields that contain long
> integers.
>
> The trouble is that sheet1 contains about 45,000 records, and sheet 2
> contains about 46,000 records, and each record does not correspond to the
> data on the other sheet (i.e a record with ID_no 221 may start from A234 in
> sheet1, but starts from A236 from sheet2).
>
> Sheet2 contains records that are not in Sheet1, so if I sort both sets of
> data by ID_no, the data will correspond to the same cell references.
>
> What i want to do is compare the two sets of data, using the ID_no as the
> unique ID to identify which records are identical and which records contain
> slightly different data (i.e. ID_no 1 in sheet1 contains the integer 500 in
> cell B2, but in sheet2, the figure is 501 for ID_no 1.
>
> Is there a piece of code i can run that outputs all the non-identical
> records on another worksheet?
>
> Hope I have explained the problem well enough, any help would be much
> appreciated.
>
> Many thanks,
>
>
> Pinda187