![]() |
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 |
All times are GMT +1. The time now is 12:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com