=24*(C2-B2+IF(C2<B2,0.5,0))
24*MOD(C2-B2,0.5)
Sub EnterTime()
InpBx1 = InputBox("Enter the hour you want.")
InpBx2 = InputBox("enter the minutes you want.")
InPBx3 = InputBox("Enter AM or PM ")
Application.ActiveCell.Value = InpBx1 & ":" & InpBx2 & ":" & "00 " & InPBx3
End Sub