View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How I can compare numbers in one book to another book

set sh1 = Workbooks(1).Worksheets(1)
set sh2 = Workbooks(2).Worksheets(1)
sh1.copy
sh2.cells.copy
Activesheet.Cells.PasteSpecial paste:=Values, operation:=xlSubtract

You could repeat for each matching sheet or reverse which sheet is
subtracted to get the correct "sense" of the difference (positive or
negative changes).

--
Regards,
Tom Ogilvy

"timppa" wrote in message
...
How I can make macro to compare numbers in one book with another book ?