Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default compare books macro

i have a macro that creates a book then creates an update book
i am trying to compare col C and col F in sheet1 with col C and col F in
sheet 1 of update book.
if there is an increase of a 100 or more in any cell in col C or F send
alert and copy sheets to sheet 1&2 of "test" workbook
what is wrong with the following. or how would i write the macro.

Sub Compare()
For i = 1 To Workbooks("Old").ActiveSheet.UsedRange.Rows.Count
If Workbooks("Old").ActiveSheet.Cells(i, "C") -
Workbooks("New").ActiveSheet.Cells(i, "C") = 100 Then
MsgBox Workbooks("Old").ActiveSheet.Cells(i, "C") & "changed by more then
100", , "Alert"
End If
Next
End Sub

thanks


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
Create a macro which can find a record in three books sand Excel Worksheet Functions 4 May 25th 07 04:18 AM
compare 2 books in excel?? LFCS Excel Worksheet Functions 1 July 11th 06 11:26 AM
compare a value in two w/books TUNGANA KURMA RAJU Excel Discussion (Misc queries) 4 December 27th 05 06:31 AM
compare books bill Excel Programming 0 August 9th 03 01:29 AM
Put copy/paste between books in macro Rajat[_3_] Excel Programming 0 July 17th 03 06:00 PM


All times are GMT +1. The time now is 10:57 PM.

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

About Us

"It's about Microsoft Excel"