View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default excel: subtract updated time from earilier

Hi,

I'm not entirely sure what you want but here is a guess:

Suppose cell A3 contains the last updated time manually entered and you want
to return 45 minutes later and enter the new time in A3 and have A4 show the
difference between the two, then you will need VBA, here is a routine to do
this for the above mentioned cells on sheet1.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A3"))
If Not isect Is Nothing Then
Range("A4") = Range("A3") - Range("A5")
Range("A5") = Range("A3")
End If
End Sub

Format cell A4 to a time format like [h]:mm:ss Cell A5 will keep track of
the last value in cell A3 so you need to leave it alone. You can use another
cell, it doesn't matter where the cells are. This is just a working sample.


If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


"Boswell" wrote:

Earilier Base, (on-updating) - Updating time ?

As example; open prgm...enter 9:00, close.

Return, (at say 9:45) time arith. [a4-a3]; would find the diff. between the
UPDATED time, (9:45), and unchanged entry, (9:00).
--
Boswell