Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Data by VB in Excel

Status
Not open for further replies.

bDreamie

Technical User
Oct 23, 2001
8
US
Hi all, I have 2 similar sets of data on a same spreadsheet, one of which has less records than the other. The reference ID of the records are unique, some can be foudn on both sets of data, some only on either one set. Can I write a macro to do a line by line comparison of the ID and thereby their value?

Eg
1st set 2nd Set
1 20 1 22
2 50 2 59
4 70 3 60
5 100 4 75

For instance, I will want to match their ID by line, ie, I have to insert a line above ID 4 to push ID 4 record down to match them on line basis. And when that is achieve, have another column calculate the difference between the values by their IDs. Eg, the value diff of ID 4 is 5.

I'm really baffled by this, any help will be great! :) Thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top