PDA

View Full Version : How to compare the difference between 2 excel files



Ann_BBO
06-12-2008, 08:15 AM
Hi All

For VBA marco, how to simply compare the content's differences between 2 excel files.
For example, A file have the below contents:A1 = "Ann", A2= "Mary", A3= "Tom". B file have the below contents: A1= "Mary", A2 = "Tom", A3 = "John" and A4 = "Tony". When i run the marco in A file, the marco can be list out the content which A files does not have (i.e. "John" and "Tony") and add them into A4 and A5 range automatically.

Thanks all ^.^

Regards,
Ann

grichey
06-12-2008, 09:18 AM
I don't have the whole thing done, but if you have a macro started, you can use IF(ISNA(MATCH(A1,'[WorkbookB]Sheet1!A:A))) then copy

RonMcK
06-12-2008, 09:25 AM
Oorang's KB article might help you get started:

http://vbaexpress.com/kb/getarticle.php?kb_id=966

Cheers,