daymood
05-17-2008, 07:16 AM
Hi,
Right now i'm busy with my finishing school-project. Hopefully you guys can help me to solve my problem! I want to create a macro to do the following:
I've two sheets. Sheet1 is housing data for more than 5000 rows and sheet2 for about 7000 rows. I want to make a macro that matches the two sheets and sheet3 needs to display the differences between both sheets. I made an example:
Sheet1
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
1-1-2007 AD1010345 V-001-BVC Ben 75210201 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.500,00
2-2-2007 HL1589789 G-004-THO Ted 56214790 $4.500,00
5-2-2007 BN7364103 C-075-POL Peter 21586466 $7.000,00
11-3-2007 TG5897466 E-014-CRY Chris 46782647 $3.500,00
etc.
Sheet2
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
1-1-2007 AD1010345 V-001-BVC Ben 75210201 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.000,00
2-2-2007 HL1589789 G-004-THO Ted 56214790 $4.500,00
1-3-2007 WF3189157 D-311-MDG Matt 85961432 $5.500,00
11-3-2007 TG5897466 E-014-CRY Chris 46782647 $3.500,00
etc.
The macro has to match both sheets and needs to use ID-number, Employee#, Name, Account# and Amount as criteria for matching the data! This will give the following result, as its create a third sheet in the active worokbook:
Sheet3
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
5-2-2007 BN7364103 C-075-POL Peter 21586466 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.000,00
1-3-2007 WF3189157 D-311-MDG Matt 85961432 $5.500,00
I hope you can help me out guys.
Lots of thanks!
Right now i'm busy with my finishing school-project. Hopefully you guys can help me to solve my problem! I want to create a macro to do the following:
I've two sheets. Sheet1 is housing data for more than 5000 rows and sheet2 for about 7000 rows. I want to make a macro that matches the two sheets and sheet3 needs to display the differences between both sheets. I made an example:
Sheet1
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
1-1-2007 AD1010345 V-001-BVC Ben 75210201 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.500,00
2-2-2007 HL1589789 G-004-THO Ted 56214790 $4.500,00
5-2-2007 BN7364103 C-075-POL Peter 21586466 $7.000,00
11-3-2007 TG5897466 E-014-CRY Chris 46782647 $3.500,00
etc.
Sheet2
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
1-1-2007 AD1010345 V-001-BVC Ben 75210201 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.000,00
2-2-2007 HL1589789 G-004-THO Ted 56214790 $4.500,00
1-3-2007 WF3189157 D-311-MDG Matt 85961432 $5.500,00
11-3-2007 TG5897466 E-014-CRY Chris 46782647 $3.500,00
etc.
The macro has to match both sheets and needs to use ID-number, Employee#, Name, Account# and Amount as criteria for matching the data! This will give the following result, as its create a third sheet in the active worokbook:
Sheet3
Column A Column B Column C Column D Column E Column F
Date ID-number Employee# Name Account# Amount
5-2-2007 BN7364103 C-075-POL Peter 21586466 $7.000,00
28-1-2007 FR5289889 A-005-JRD John 25941230 $6.000,00
1-3-2007 WF3189157 D-311-MDG Matt 85961432 $5.500,00
I hope you can help me out guys.
Lots of thanks!