Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Is there a way to format a cell so that if you enter a time, such as entering :30 into A3, and having Excel automatically changing that value to decimal, in this case, .50? So if I enter :30, hit enter, and it changes to .50 in the same cell? Thanks! ![]() -- bellz ------------------------------------------------------------------------ bellz's Profile: http://www.excelforum.com/member.php...o&userid=30429 View this thread: http://www.excelforum.com/showthread...hreadid=500990 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Anybody have any ideas? -- bellz ------------------------------------------------------------------------ bellz's Profile: http://www.excelforum.com/member.php...o&userid=30429 View this thread: http://www.excelforum.com/showthread...hreadid=500990 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Bellz,
First of all, (at least my version of) Excel does not accept :30 as time. It is accepted as text. With this said, your job can be done with an event macro: Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Left(Target.Value, 1) = ":" And IsNumeric(Mid(Target.Value, 2, Len(Target.Value))) Then Target.Value = CInt(Mid(Target.Value, 2, Len(Target.Value))) / 60 End If End Sub Press Alt+F11 to bring up the VBA IDE. At the top left is the Project Explorer window. Under the workbook you want to work with there is the icon ThisWorkbook. Double-click the icon to bring up the VBA code page for the workbook. Paste the above code. HTH Kostis Vezerides |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
" / " Changing Decimal number format to Fraction on Protected Cell | Excel Worksheet Functions | |||
Cond. Format & Absolute Cell Reference Question | Excel Discussion (Misc queries) | |||
how do I format a cell reference to move as source changes | Excel Worksheet Functions | |||
can't format cell - have tried unlocking and unprotecting | Excel Discussion (Misc queries) | |||
difficulty changing cell format | Excel Worksheet Functions |