How to add AM/PM to a cell

keithjones33

New Member
Joined
Dec 9, 2016
Messages
12
I have an excel spreadsheet which I am trying to improve. One of the columns is based on whether a shift was a morning shift (AM) or an afternoon shift (PM). currently it is using a data validation and I have to pick from a drop down list. Is there a formula that automatically inputs either AM or PM based on the systems clock. I have tried a few things but nothing works, do I have to use VBA which I am a complete novice.

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi,
You could format your cells to a custom format of h:mm AM/PM, if you use a 24hr clock it will automatically add the AM/PM to the time for you

14:00 becomes 2:00 PM and 02:00 or 2:00 becomes 2:00 AM
 
Upvote 0
Hi,
You could format your cells to a custom format of h:mm AM/PM, if you use a 24hr clock it will automatically add the AM/PM to the time for you

14:00 becomes 2:00 PM and 02:00 or 2:00 becomes 2:00 AM

Thanks bugmonsta. Not quite what I want to do. I just want to show AM or PM (not the time) based on the system clock. for example if the clock is showing between 00:01 and 11:59 I want the cell to show just AM, if the clock shows between 12.00 and 12:00 then I want the cell to show just PM.
 
Upvote 0
Hi, you could try:

=TEXT(NOW(),"AM/PM")
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,147
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top