Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How I can compare numbers in one book to another book

How I can make macro to compare numbers in one book with another book ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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 ?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving worksheets to another book - 2nd book will not appear jb0100 Excel Discussion (Misc queries) 2 March 18th 09 03:09 PM
copy worksheets to new book without linking to original book Lori Excel Discussion (Misc queries) 2 March 4th 09 04:46 PM
Missing Cheque numbers in a bank book Kumar Excel Discussion (Misc queries) 8 November 19th 08 03:11 PM
to disconnect a destination book from a source book officegirl Excel Discussion (Misc queries) 4 December 10th 07 09:28 PM
bank book or pass book eceal Excel Worksheet Functions 1 May 8th 07 02:24 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"