ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compare two sets of data (https://www.excelbanter.com/excel-programming/336827-compare-two-sets-data.html)

Bhupinder Rayat

Compare two sets of data
 
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

[email protected]

Compare two sets of data
 
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


Tom Ogilvy

Compare two sets of data
 
a start would be to look at the techniques on Chip Pearson's page on
Duplicates and Uniques

http://www.cpearson.com/excel/duplicat.htm

You could probably cobble something together from what is written there.


You could also search google groups

http://groups.google.com
go to advanced search and search on compare in

Microsoft.public.excel.programming

--
Regards,
Tom Ogilvy

"Bhupinder Rayat" wrote in
message ...
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





All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com