Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If so, then this is the modified code for these two cells:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 1 And Target.Row = 12 And Target.Row <= 32 Then Application.EnableEvents = False If Len(Target) = 4 Then hr = Left(Target, 1) mn = Mid(Target, 2, 2) ap = Right(Target, 1) Else hr = Left(Target, 2) mn = Mid(Target, 3, 2) ap = Right(Target, 1) End If Target.Value = TimeValue(hr & ":" & mn & " " & ap) NumberFormat = "h:mm AM/PM" Application.EnableEvents = True End If End Sub Regards, Kostis On Mar 12, 7:55 pm, cpolley wrote: Thank you so much! I would need it to apply to only cells A12 thru A32 if possible. You've been a tremendous help, thank you! "cpolley" wrote: I need to be able to type numbers into a cell and then have the cell return a time. I have a sheet where I want the agent to be able to type in say 123p and get 1:23pm in return. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding numbers to a Time Formated cell | Excel Discussion (Misc queries) | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions | |||
numbers to time | Excel Worksheet Functions | |||
How to make a cell hold numbers as a length of time in xcel? | Excel Discussion (Misc queries) | |||
Adding time to date-time formatted cell | Excel Discussion (Misc queries) |