Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
QD QD is offline
external usenet poster
 
Posts: 12
Default changing the format for the time shen entered as HHMM to HH:MM

Can anyone help me to convert the format of time entered from HHMM to
HH:MM in the same cell.

For example:
Date entry converts to, in the same cell
0840 08:40
1150 11:60

Thanks
QD

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default changing the format for the time shen entered as HHMM to HH:MM

=(INT(A1/100)+MOD(A1,100)/60)/24

and format as time

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"QD" wrote in message
oups.com...
Can anyone help me to convert the format of time entered from HHMM to
HH:MM in the same cell.

For example:
Date entry converts to, in the same cell
0840 08:40
1150 11:60

Thanks
QD



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 174
Default changing the format for the time shen entered as HHMM to HH:MM

Why would 1150 become 11:60? (or is it just a typo?)

I don't think you can do that directly in the same cell unless it's for
display purposes only, in which case you could use a custom format of

00\:00

If you actually want to change the value then you need to do that with VBA
or a formula in another cell, e.g.

=TEXT(A1,"00\:00")+0



"QD" wrote:

Can anyone help me to convert the format of time entered from HHMM to
HH:MM in the same cell.

For example:
Date entry converts to, in the same cell
0840 08:40
1150 11:60

Thanks
QD


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM
Custom Time Format doesn't work for me chuck Excel Discussion (Misc queries) 1 February 13th 05 04:12 AM
I cannot get time format to display in a drop-down list Mighty Mike Excel Discussion (Misc queries) 0 February 1st 05 09:47 PM
entering numbers to display a time format Ian Williams/Eazygig Excel Discussion (Misc queries) 1 January 10th 05 11:57 AM
Time Format Auto Entry AM and PM BulaMan Excel Discussion (Misc queries) 1 December 15th 04 09:30 AM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"