Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default formula for converting military time to standard time, etc

I have 5 cells in a row (A1 - A5). I need to subtract, in military time, A1
from A2 and then A3 from A4 and the total should be in A5 as standard time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default formula for converting military time to standard time, etc

Simply:

=A2-A1+A4-A3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have 5 cells in a row (A1 - A5). I need to subtract, in military time,
A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default formula for converting military time to standard time, etc

I have been trying that but the formula stays in the cell as I typed it
above(not the result but the formula). I also need the end result to be in
standard time, not military time.

"Sandy Mann" wrote:

Simply:

=A2-A1+A4-A3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have 5 cells in a row (A1 - A5). I need to subtract, in military time,
A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default formula for converting military time to standard time, etc

Time in Excel is always hh:mm:ssAM/PM no matter how you format it.

hhmm is still hh:mm:ss

hh:mm is still hh:mm:ss

Just do your subtraction in the normal manner as Sandy points out.


Gord Dibben MS Excel MVP

On Sat, 16 Feb 2008 11:35:01 -0800, Pattio
wrote:

I have 5 cells in a row (A1 - A5). I need to subtract, in military time, A1
from A2 and then A3 from A4 and the total should be in A5 as standard time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default formula for converting military time to standard time, etc

I have been trying that but the formula stays in the cell

Which almost certainly means that the cell is formatted as Text.

Re-format the cell as hh:mm and then delete the contents of the cell and
re-enter the formula.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have been trying that but the formula stays in the cell as I typed it
above(not the result but the formula). I also need the end result to be
in
standard time, not military time.

"Sandy Mann" wrote:

Simply:

=A2-A1+A4-A3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have 5 cells in a row (A1 - A5). I need to subtract, in military
time,
A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.









  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default formula for converting military time to standard time, etc

Ooops, sorry, it appears that I changed the cell to TEXT. Now back to the
original problem, I have the problem with A2-4. I have the formula for these
cells set up as hhmm but each time I enter a number, i.e. 0500 it goes back
to 0000. I changed it to hh:mm and it is the same 00:00 but should be 05:00.
What's up?

"Sandy Mann" wrote:

Simply:

=A2-A1+A4-A3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have 5 cells in a row (A1 - A5). I need to subtract, in military time,
A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default formula for converting military time to standard time, etc

Formatting as hhmm does not allow you to enter time as 0500

Format as hhmm but enter as 05:00 to get 5:00AM which will be viewed as 0500 in
cell

14:00 to get 2:00PM which will be viewed as 1400 in cell

If you want to enter time as 0500 you will need VBA event code.


Gord

On Sat, 16 Feb 2008 12:19:00 -0800, Pattio
wrote:

Ooops, sorry, it appears that I changed the cell to TEXT. Now back to the
original problem, I have the problem with A2-4. I have the formula for these
cells set up as hhmm but each time I enter a number, i.e. 0500 it goes back
to 0000. I changed it to hh:mm and it is the same 00:00 but should be 05:00.
What's up?

"Sandy Mann" wrote:

Simply:

=A2-A1+A4-A3

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Pattio" wrote in message
...
I have 5 cells in a row (A1 - A5). I need to subtract, in military time,
A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.





  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default formula for converting military time to standard time, etc

All of you are great! I have finally gotten it to work. One last question
though. When adding the column to get the total number of hours the result
is strange. I am adding
12:35
10:30
12:10
9:20
10:15
but the total comes out as 6:50 instead of 54:30. I have read the other
threads but can't seem to get the other examples to work. It appears that I
can't go beyond 24 hours.

"Gord Dibben" wrote:

Time in Excel is always hh:mm:ssAM/PM no matter how you format it.

hhmm is still hh:mm:ss

hh:mm is still hh:mm:ss

Just do your subtraction in the normal manner as Sandy points out.


Gord Dibben MS Excel MVP

On Sat, 16 Feb 2008 11:35:01 -0800, Pattio
wrote:

I have 5 cells in a row (A1 - A5). I need to subtract, in military time, A1
from A2 and then A3 from A4 and the total should be in A5 as standard time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default formula for converting military time to standard time, etc

If your total may go beyond 24 hours, format as [h]:mm, not as h:mm

It comes to 54:50, so I'm not sure where your 54:30 comes from?
--
David Biddulph

"Pattio" wrote in message
...
All of you are great! I have finally gotten it to work. One last
question
though. When adding the column to get the total number of hours the
result
is strange. I am adding
12:35
10:30
12:10
9:20
10:15
but the total comes out as 6:50 instead of 54:30. I have read the other
threads but can't seem to get the other examples to work. It appears that
I
can't go beyond 24 hours.

"Gord Dibben" wrote:

Time in Excel is always hh:mm:ssAM/PM no matter how you format it.

hhmm is still hh:mm:ss

hh:mm is still hh:mm:ss

Just do your subtraction in the normal manner as Sandy points out.


Gord Dibben MS Excel MVP

On Sat, 16 Feb 2008 11:35:01 -0800, Pattio

wrote:

I have 5 cells in a row (A1 - A5). I need to subtract, in military
time, A1
from A2 and then A3 from A4 and the total should be in A5 as standard
time.
Cells A1-A4 are formatted as hhmm and cell A5 is formatted as hh:mm.





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
Converting Standard Time to Military Time in Excel mtvschultz Excel Discussion (Misc queries) 3 May 5th 23 11:42 AM
Converting Standard Time into Military Time mtvschultz Excel Discussion (Misc queries) 3 February 15th 08 07:34 PM
How to I convert standard time to Military or 24 hour format? Nacho Excel Discussion (Misc queries) 5 June 28th 06 07:14 PM
Converting decimal time to standard time? mpendleton Excel Discussion (Misc queries) 4 May 12th 06 10:07 PM
Convert data into standard military time format geog Excel Discussion (Misc queries) 2 December 12th 05 07:46 PM


All times are GMT +1. The time now is 06:41 AM.

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"