#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 90
Default Freezing Values

I have a worksheet that received dynamic feeds. I want to preserve the value
at a certain point in time, such as 4 PM, without having to do a Copy, Paste
Special as Values every day. Is this possible? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Freezing Values

Chuck,

You could use a macro with the ontime method. See an example below, which stores the values from
cells A1:E1 in the first available cells below the last data stored - it also stored the date and
time in column F. Run StartIt to initiate the process, and keep it open forever.... You can
manually store the data by running PreserveValues without the OnTime line included.

HTH,
Bernie
MS Excel MVP

Dim NextTime As Date

Sub StartIt()
NextTime = TimeValue("16:00:00")
Application.OnTime NextTime, "PreserveValues"
End Sub

Sub PreserveValues()
Dim mySht As Worksheet
NextTime = TimeValue("16:00:00")
Set mySht = ActiveWorkbook.Sheets("Sheet Name")
With mySht.Cells(Rows.Count, 1).End(xlUp)(2)
.Resize(1, 5).Value = mySht.Range("A1:E1").Value
With .Offset(0, 5)
.Value = Now()
.NumberFormat = "mmm dd, yyyy hh:mm:ss"
End With
End With
Application.OnTime NextTime, "PreserveValues"
End Sub

Sub StopIt()
Application.OnTime NextTime, "PreserveValues", schedule:=False
End Sub






"Chuck" wrote in message
...
I have a worksheet that received dynamic feeds. I want to preserve the value
at a certain point in time, such as 4 PM, without having to do a Copy, Paste
Special as Values every day. Is this possible? 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
Freezing on SumIf Kimmerz321 Excel Discussion (Misc queries) 7 February 20th 06 07:21 PM
freezing panes peter Setting up and Configuration of Excel 2 February 17th 06 03:25 AM
freezing a row Seren Setting up and Configuration of Excel 2 November 30th 05 02:35 PM
freezing cell values anthony Excel Worksheet Functions 1 May 10th 05 05:42 PM
Freezing cells... ANDREW_B Excel Discussion (Misc queries) 1 January 4th 05 04:08 PM


All times are GMT +1. The time now is 11:50 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"