Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining AM or PM in text string

I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default Determining AM or PM in text string

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&HOUR(NOW())&":"&MINUTE(NOW())&" "&IF(HOUR(NOW())12,"PM","AM")

HTH
Carim

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 98
Default Determining AM or PM in text string

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())&IF
(HOUR(NOW())<=11," am"," pm")

HTH

Simon

(This will work when the clock is set to 24h, but I have not testest it on
the 12h setting)

Bob wrote:
I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200610/1

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 618
Default Determining AM or PM in text string

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&MOD(HOUR(NOW()),12)&":"&MINUTE(NOW())&IF(HOUR(NO W())12," PM"," AM")
--
David Biddulph

"Bob" wrote in message
...
I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining AM or PM in text string

Carim - Thanks!
Bob

"Carim" wrote:

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @
"&HOUR(NOW())&":"&MINUTE(NOW())&" "&IF(HOUR(NOW())12,"PM","AM")

HTH
Carim




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining AM or PM in text string

Thanks!
Bob


"smw226 via OfficeKB.com" wrote:

Hi Bob,

="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())&IF
(HOUR(NOW())<=11," am"," pm")

HTH

Simon

(This will work when the clock is set to 24h, but I have not testest it on
the 12h setting)

Bob wrote:
I created the following formula:
="As of "&MONTH(NOW())&"/"&DAY(NOW())&" @ "&HOUR(NOW())&":"&MINUTE(NOW())
and I would like to add "AM" or "PM" to it.
Can someone help me modify my formula to include it?
Thanks for the help.


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200610/1


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Determining AM or PM in text string

Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining AM or PM in text string

Lori,
Thanks!!! I like your solution the best because the formula is short (and
efficient), and it doesn't display the time in military format.
Thanks again,
Bob


"Lori" wrote:

Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Determining AM or PM in text string

Happy to assist, it's the same as entering =NOW() and formatting the
number as in the formula.

Bob wrote:

Lori,
Thanks!!! I like your solution the best because the formula is short (and
efficient), and it doesn't display the time in military format.
Thanks again,
Bob


"Lori" wrote:

Alternatively, try:

=TEXT(NOW(),"A\s of mm/dd \@ h:mm AM/PM")



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
How do I grab the date from a text string? [email protected] Excel Worksheet Functions 4 June 6th 06 07:55 AM
Find & Replace text format jmn13 Excel Discussion (Misc queries) 2 May 25th 06 06:18 PM
Text string and sum michaelp Excel Worksheet Functions 4 November 14th 05 09:49 PM
Remove last character of text string Grant Excel Worksheet Functions 2 September 29th 05 05:17 PM
dynamic cell reference within a text string gvm Excel Worksheet Functions 4 July 25th 05 02:40 AM


All times are GMT +1. The time now is 04:20 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"