Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default comparing sheets

I know this has probably been discussed milliions of times before, but
I am still quite confused. I need to compare two sheets for
differences, without highlighting them or anything. just comparing.
Basically, I have a sheet that updates from an internet service that's
always running, and I needed a small macro that will check if the
service has frozen.
The way I see it, the best thing is to have a macro that compares the
updating sheet to a hidden sheet that will be a copy of it, so the
macro structure would be something like

ontime run every 2 minutes
compare sheet1 and hiddensheet
if sheet1 = hiddensheet then msgbox "verify internet connection"
else copy sheet1 nad paste on hiddensheet

I hope I have made myself clear, and that somebody out there can help
me, please...
Thank you for any help you may be able to give

Lorenzo Lucchini Gilera
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default comparing sheets

Thanks Tom, that worked great!

Regards
Will
-----Original Message-----
I know this has probably been discussed milliions of

times before, but
I am still quite confused. I need to compare two sheets

for
differences, without highlighting them or anything. just

comparing.
Basically, I have a sheet that updates from an internet

service that's
always running, and I needed a small macro that will

check if the
service has frozen.
The way I see it, the best thing is to have a macro that

compares the
updating sheet to a hidden sheet that will be a copy of

it, so the
macro structure would be something like

ontime run every 2 minutes
compare sheet1 and hiddensheet
if sheet1 = hiddensheet then msgbox "verify internet

connection"
else copy sheet1 nad paste on hiddensheet

I hope I have made myself clear, and that somebody out

there can help
me, please...
Thank you for any help you may be able to give

Lorenzo Lucchini Gilera
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default comparing sheets

What will you be comparing - Numbers.

The basic approach would be to use the Ontime method

See Chip Pearson's page on this

http://www.cpearson.com/excel/ontime.htm

If you are comparing numbers

in the procedure triggered by ontime you can

Activesheet.UsedRange.copy
With worksheets("HiddenSheet")
.Range("A1").PasteSpecial paste:=xlPasteValues, _
Operation:=xlPasteSpecialOperationSubtract
res = Application.Sum(.UsedRange)
End With
if res = 0 then
' sheets are identical
Else
' sheets are differenct
End if

Of course if you would consistently have offsetting/complimentatry changes
such a -4 and +4 in different cells then this would be problematic, but
hopefully that would not be the case.

--
Regards,
Tom Ogilvy


"Lorenzo" wrote in message
om...
I know this has probably been discussed milliions of times before, but
I am still quite confused. I need to compare two sheets for
differences, without highlighting them or anything. just comparing.
Basically, I have a sheet that updates from an internet service that's
always running, and I needed a small macro that will check if the
service has frozen.
The way I see it, the best thing is to have a macro that compares the
updating sheet to a hidden sheet that will be a copy of it, so the
macro structure would be something like

ontime run every 2 minutes
compare sheet1 and hiddensheet
if sheet1 = hiddensheet then msgbox "verify internet connection"
else copy sheet1 nad paste on hiddensheet

I hope I have made myself clear, and that somebody out there can help
me, please...
Thank you for any help you may be able to give

Lorenzo Lucchini Gilera



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
comparing 2 sheets rodchar Excel Discussion (Misc queries) 2 May 20th 09 03:38 PM
Comparing 2 sheets PauloG Excel Discussion (Misc queries) 5 May 13th 08 12:47 PM
Sheets comparing Saed Excel Worksheet Functions 1 April 1st 08 07:21 AM
comparing 2 sheets rodchar Excel Discussion (Misc queries) 3 September 11th 07 03:55 AM
comparing 2 sheets studentcog Excel Worksheet Functions 1 February 15th 06 04:46 PM


All times are GMT +1. The time now is 07:13 AM.

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"