|
From: Breck on 20 Jul 2008 01:23 I have a excel worksheet that is linked to a website. Every 60 minutes the web query refreshes. 7500 rows of data in 4 columns is updated but not all rows have changed since the last update.I found the following code in the group that worked fine when I manually enter a number in the forth column but when the web query refreshes the date it does not create a time stamp Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 4 Then Target.Offset(0, 10).Value = Now 'Or like this Format(Now, "mm/dd/yy hh:mm:ss") instead of Now End If End Sub can this code be adjusted to create a time stamp when the web query automatically refreshes every hour for only the rows that had changed and not change the original date of the last change when the row hasn't changed? Usually a row only changes one every 24 hours. But it is possible that it may change more that once in 24 hours and it may not change for more than a year. I hope that this isn't to difficult an issue for a solution.
From: Breck on 20 Jul 2008 01:35 If possible I you also like to calculate the difference between the old and the new values since the previous web query refresh. Thanks On Jul 19, 11:23 pm, Breck <betuttl...(a)gmail.com> wrote: > I have a excel worksheet that is linked to a website. Every 60 minutes > the web query refreshes. 7500 rows of data in 4 columns is updated but > not all rows have changed since the last update.I found the following > code in the group that worked fine when I manually enter a number in > the forth column but when the web query refreshes the date it does not > create a time stamp > > Private Sub Worksheet_Change(ByVal Target As Range) > If Target.Column = 4 Then > Target.Offset(0, 10).Value = Now > 'Or like this Format(Now, "mm/dd/yy hh:mm:ss") instead of Now > End If > End Sub > > can this code be adjusted to create a time stamp when the web query > automatically refreshes every hour for only the rows that had changed > and not change the original date of the last change when the row > hasn't changed? Usually a row only changes one every 24 hours. But it > is possible that it may change more that once in 24 hours and it may > not change for more than a year. I hope that this isn't to difficult > an issue for a solution.
From: Breck on 20 Jul 2008 01:35 If possible I you also like to calculate the difference between the old and the new values since the previous web query refresh. Thanks On Jul 19, 11:23 pm, Breck <betuttl...(a)gmail.com> wrote: > I have a excel worksheet that is linked to a website. Every 60 minutes > the web query refreshes. 7500 rows of data in 4 columns is updated but > not all rows have changed since the last update.I found the following > code in the group that worked fine when I manually enter a number in > the forth column but when the web query refreshes the date it does not > create a time stamp > > Private Sub Worksheet_Change(ByVal Target As Range) > If Target.Column = 4 Then > Target.Offset(0, 10).Value = Now > 'Or like this Format(Now, "mm/dd/yy hh:mm:ss") instead of Now > End If > End Sub > > can this code be adjusted to create a time stamp when the web query > automatically refreshes every hour for only the rows that had changed > and not change the original date of the last change when the row > hasn't changed? Usually a row only changes one every 24 hours. But it > is possible that it may change more that once in 24 hours and it may > not change for more than a year. I hope that this isn't to difficult > an issue for a solution.
From: Breck on 20 Jul 2008 01:41 If possible I would also like to calculate the amount each cell changes in column 4 since the last time it changed as the result of the web query refresh. On Jul 19, 11:23 pm, Breck <betuttl...(a)gmail.com> wrote: > I have a excel worksheet that is linked to a website. Every 60 minutes > the web query refreshes. 7500 rows of data in 4 columns is updated but > not all rows have changed since the last update.I found the following > code in the group that worked fine when I manually enter a number in > the forth column but when the web query refreshes the date it does not > create a time stamp > > Private Sub Worksheet_Change(ByVal Target As Range) > If Target.Column = 4 Then > Target.Offset(0, 10).Value = Now > 'Or like this Format(Now, "mm/dd/yy hh:mm:ss") instead of Now > End If > End Sub > > can this code be adjusted to create a time stamp when the web query > automatically refreshes every hour for only the rows that had changed > and not change the original date of the last change when the row > hasn't changed? Usually a row only changes one every 24 hours. But it > is possible that it may change more that once in 24 hours and it may > not change for more than a year. I hope that this isn't to difficult > an issue for a solution.
From: Breck on 20 Jul 2008 01:41 If possible I would also like to calculate the amount each cell changes in column 4 since the last time it changed as the result of the web query refresh. On Jul 19, 11:23 pm, Breck <betuttl...(a)gmail.com> wrote: > I have a excel worksheet that is linked to a website. Every 60 minutes > the web query refreshes. 7500 rows of data in 4 columns is updated but > not all rows have changed since the last update.I found the following > code in the group that worked fine when I manually enter a number in > the forth column but when the web query refreshes the date it does not > create a time stamp > > Private Sub Worksheet_Change(ByVal Target As Range) > If Target.Column = 4 Then > Target.Offset(0, 10).Value = Now > 'Or like this Format(Now, "mm/dd/yy hh:mm:ss") instead of Now > End If > End Sub > > can this code be adjusted to create a time stamp when the web query > automatically refreshes every hour for only the rows that had changed > and not change the original date of the last change when the row > hasn't changed? Usually a row only changes one every 24 hours. But it > is possible that it may change more that once in 24 hours and it may > not change for more than a year. I hope that this isn't to difficult > an issue for a solution.
|
Pages: 1 Prev: My Excel macros won't run any more, even Low security Next: Input Question Help |