#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Omiting AM/PM

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Omiting AM/PM

Kojak,

You would need to use a helper column of formulas to subtract 0.5 from times that are after Noon.

HTH,
Bernie
MS Excel MVP


"kojak" wrote in message
...
How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Omiting AM/PM

You can use text entries instead, of course then you can't make any
calculations
If you precede the entry with an apostrophe or preformat as text you can use
whatever you want. But you can't format a number as time without letting
Excel know what time of day it is. One hour in Excel is the number 1/24,
that means that 02:30 is 2.5*(1/24) whereas 02:30 PM is 14.5*(1/24) so the
values are not the same thus cannot be displayed the same


Regards,

Peo Sjoblom


"kojak" wrote in message
...
How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not
as
14:30.
Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Omiting AM/PM

I couldn't find a formatting solution. In the event nobody else can and you
don't mind displaying a dummy column referencing your real data, this will
show your data the way you want it when you format as 24-hour time.

Assuming your real data is in cell A1:

=IF(A1-INT(A1)13/24,A1-12/24,IF(A1-INT(A1)<1/24,A1+12/24,IF(A1-INT(A1)=13/24,1/24,A1)))

"kojak" wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Omiting AM/PM

I appreciate everyones help.
Eric I tried your formula, modifiying A1 to P5, but the answer that I got
for 4:30 pm was 0.1875. What I am wanting is for it to display 4:30 without
the pm.

"Eric" wrote:

I couldn't find a formatting solution. In the event nobody else can and you
don't mind displaying a dummy column referencing your real data, this will
show your data the way you want it when you format as 24-hour time.

Assuming your real data is in cell A1:

=IF(A1-INT(A1)13/24,A1-12/24,IF(A1-INT(A1)<1/24,A1+12/24,IF(A1-INT(A1)=13/24,1/24,A1)))

"kojak" wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Omiting AM/PM

The only challenge is that times (either original or derived after
subtracting 0.5) from 12:00-12:59 a.m. display looking like "00:59" in
24-hour format. Hence all the extra workarounds in my formula.

"Bernie Deitrick" wrote:

Kojak,

You would need to use a helper column of formulas to subtract 0.5 from times that are after Noon.

HTH,
Bernie
MS Excel MVP


"kojak" wrote in message
...
How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Omiting AM/PM

Format as 24-hour time. (Shows as "13:30" under the Format Cells-Time
selection)

"kojak" wrote:

I appreciate everyones help.
Eric I tried your formula, modifiying A1 to P5, but the answer that I got
for 4:30 pm was 0.1875. What I am wanting is for it to display 4:30 without
the pm.

"Eric" wrote:

I couldn't find a formatting solution. In the event nobody else can and you
don't mind displaying a dummy column referencing your real data, this will
show your data the way you want it when you format as 24-hour time.

Assuming your real data is in cell A1:

=IF(A1-INT(A1)13/24,A1-12/24,IF(A1-INT(A1)<1/24,A1+12/24,IF(A1-INT(A1)=13/24,1/24,A1)))

"kojak" wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Omiting AM/PM

Thanks Eric. That did the trick. That is one that I should have caught
myself. Again thanks for your help.

"Eric" wrote:

Format as 24-hour time. (Shows as "13:30" under the Format Cells-Time
selection)

"kojak" wrote:

I appreciate everyones help.
Eric I tried your formula, modifiying A1 to P5, but the answer that I got
for 4:30 pm was 0.1875. What I am wanting is for it to display 4:30 without
the pm.

"Eric" wrote:

I couldn't find a formatting solution. In the event nobody else can and you
don't mind displaying a dummy column referencing your real data, this will
show your data the way you want it when you format as 24-hour time.

Assuming your real data is in cell A1:

=IF(A1-INT(A1)13/24,A1-12/24,IF(A1-INT(A1)<1/24,A1+12/24,IF(A1-INT(A1)=13/24,1/24,A1)))

"kojak" wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Omiting AM/PM

If you're willing to use that helper cell:

=LEFT(TEXT(A1,"hh:mm AM/PM"),5)
or
=TEXT(MOD(A1,0.5),"h:mm")



kojak wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Omiting AM/PM

Thanks Dave, both of those do exactly what I was looking for.

"Dave Peterson" wrote:

If you're willing to use that helper cell:

=LEFT(TEXT(A1,"hh:mm AM/PM"),5)
or
=TEXT(MOD(A1,0.5),"h:mm")



kojak wrote:

How can I get time to display without the AM or PM after it, using 12 hour
day? I am wanting something like 2:30 pm to display as just 2:30 and not as
14:30.
Thanks in advance.


--

Dave Peterson

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
omiting cells in average calcs Blackstar79 Excel Discussion (Misc queries) 3 April 25th 06 11:12 PM


All times are GMT +1. The time now is 10:36 AM.

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

About Us

"It's about Microsoft Excel"