Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
In Cell A1 I have text Start Time and Cell A2 I have text Now. Cell B1 contains the start time (manually entered) and cell B2 contains the NOW() function. Cell B3 subtracts the difference between cells B2-B1. All that works as expected. Now the issue, I need to take the difference convert it to its decimal equilvalent (i.e. cell B2-B1=3:42 or 3.7) and multiply it by 60 to get its minute equivalent. How can I achieve this?
Also, I have this snippet of code to Autoupdate the now function but I can't get it to format the current time to 24 hour time.
Thank You
Also, I have this snippet of code to Autoupdate the now function but I can't get it to format the current time to 24 hour time.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
With Target.Offset(0, 2)
.Value = Now
.NumberFormat = "HH:mm:ss"
End With
End Sub
Thank You
Last edited: