Hello again... you were all so much help before, I have another question for youz:
In one cell I need to enter this:
1-1-04 20:45
and in the next cell over I need to enter this:
1-3-04 21:00
...with the third cell displaying the elapsed hours and minutes. Easy right? Well here's the rub:
I'm using this VBA formula to quick-enter military time (with an automatic 24hr clock conversion):
Private Sub Worksheet_Change(ByVal Target As Range)
UserInput = Format(Target.Value, "0000")
If Len(UserInput) > 1 Then
NewInput = Left(UserInput, Len(UserInput) - 2) & ":" & Right(UserInput, 2)
Application.EnableEvents = False
Target = NewInput
Application.EnableEvents = True
End If
End Sub
In conjunction with this, I'm using this formula to calulate the elapsed time:
=C2-B2+IF(B2>C2,1)
The question is how can I alter the formula(s) in order to be able to type this:
1-1-04 2045
...in the first cell, and this:
1-3-04 2100
...in the second cell to get the third cell to correctly display the elasped time, factoring in the elapsed days? I only need the result cell to show [h]:mm if that helps?
Sorry if all the above is redundant, I just want to give you guys all the info I can to help speed the solution.
Thanx again, hope to hear from you!
~Brian
In one cell I need to enter this:
1-1-04 20:45
and in the next cell over I need to enter this:
1-3-04 21:00
...with the third cell displaying the elapsed hours and minutes. Easy right? Well here's the rub:
I'm using this VBA formula to quick-enter military time (with an automatic 24hr clock conversion):
Private Sub Worksheet_Change(ByVal Target As Range)
UserInput = Format(Target.Value, "0000")
If Len(UserInput) > 1 Then
NewInput = Left(UserInput, Len(UserInput) - 2) & ":" & Right(UserInput, 2)
Application.EnableEvents = False
Target = NewInput
Application.EnableEvents = True
End If
End Sub
In conjunction with this, I'm using this formula to calulate the elapsed time:
=C2-B2+IF(B2>C2,1)
The question is how can I alter the formula(s) in order to be able to type this:
1-1-04 2045
...in the first cell, and this:
1-3-04 2100
...in the second cell to get the third cell to correctly display the elasped time, factoring in the elapsed days? I only need the result cell to show [h]:mm if that helps?
Sorry if all the above is redundant, I just want to give you guys all the info I can to help speed the solution.
Thanx again, hope to hear from you!
~Brian