View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
WildWill WildWill is offline
external usenet poster
 
Posts: 64
Default Recording Historic Trend Data

Thanks jasontferrell!

Could you advise me on where/how I would implement this code into my
spreadsheet? Have never done something like this before. Thanks!

"jasontferrell" wrote:

Without code, I think the formula solution you seek would be
cumbersome to keep the historic values and get the new values with the
same formula. You might be better off with a subroutine that you
could run whenever the sheet was opened or whenever the values change:
Dim sht As Worksheet
Dim x As Integer
Set sht = ActiveSheet
For x = 4 To 7
If Date = DateValue(sht.Cells(1, x).Value) Then
sht.Cells(2, x).Value = sht.Cells(2, 2).Value
sht.Cells(3, x).Value = sht.Cells(3, 2).Value
sht.Cells(4, x).Value = sht.Cells(4, 2).Value
End If
Next x
Set sht = Nothing