Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-26-2016, 01:47 AM
joeu2004 joeu2004 is offline time formatting Windows 7 32bit time formatting Office 2007
Advanced Beginner
 
Join Date: Aug 2016
Posts: 32
joeu2004 is on a distinguished road
Default

Quote:
Originally Posted by CLEMMON View Post
How can I format cell A1 so that when I enter the time in military format in A1, it will display as standard time in A1. Example:I would like to enter 1400 in A1 and have the same cell display 2:00PM
You cannot accomplish that with formatting alone. The Excel time 14:00 or 2:00 PM is represented internally by a fraction of a day. The number 1400 would be interpreted as DATE(1903,10,31).

You could create an event macro that is invoked each time you enter a value; and there, you can convert the data entry.

Or you could enter the following formula into a parallel column: =--TEXT(A1,"00\:00"). The double negate converts the text into numeric, interpreting 14:00 as time.

In either case, format the cell as Time or Custom hh:mm .

Last edited by joeu2004; 08-26-2016 at 01:54 AM. Reason: cosmetic
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
time formatting Employee Turnover by Department/Month split between Voluntary/Involuntary - Full-time/Part-time CPSmith Excel 1 03-26-2016 02:48 AM
VBA Word Table - Select More than 1 Column at a time - Apply Formatting jc491 Word VBA 12 09-24-2015 06:03 AM
Help - Run-time error 91 - VBA for inserting and formatting text depending on style mtrborges Word VBA 2 02-08-2015 11:35 PM
Formatting Merged Time Values Between Excel & Word JennEx Mail Merge 1 07-12-2012 02:54 PM
time formatting Cell formatting for time - Excel 2010 PomDave Excel 5 09-05-2011 10:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft