Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Entering Time, having proble with AM/PM 1

Status
Not open for further replies.

bocker

Programmer
Mar 9, 2001
81
US
I am developing a timesheet in Excel. I have basic experience in Excel, Good Experience in Access.

I have a Start Column, End Column, and a Total Column. I have the Start and End format set to h:mm AM/PM.

My problem is that the cell defaults to AM. I would like to program it to do the following:

If I enter 8: and press tab/enter I get 8:00 AM.

I would like:

9: to be 9:00 AM
10: to be 10:00 AM
11: to be 11:00 AM
12: to be 12:00 PM
1: to be 1:00 PM
2: to be 2:00 PM
3: to be 3:00 PM
4: to be 4:00 PM
5: to be 5:00 PM
6: to be 6:00 PM
7: to be 7:00 PM

8: I would like to leave and enter either 8:00 AM or 8:00 PM

I have searched the internet for answers to this problem and have not found anything. I would appreciate HELP with this proble.
 
You can format the cells as time AM/PM, and enter 13:00 and it will show 1:00 PM

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thank you for your reply. I would like to stay away from the military time if possible.
 
Why stay away from "military" time if it does what you need ??
Seems like a very blinkered approach and unfortunately, your only one unless you fancy writing some VBA to create that logic for you !

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
would argue that it is not military time either just a standard 24 hour clock that most people should/do know how to use.
Now real military time is 13:00 Zulu, Lima etc which is the time and the locale also as Geoff says it is the most efficent way to work.

Regards, Phil.

M.U.F.C. Show your true support here:
"Shares not Shirts
 
If you format a cell as time, entering '4 p' (without the quotes) will enter 4:00 pm. '4 a' will enter 4:00 am.
 
bocker,

You need to understand Data/Time in MS Office Applications.

Date/Time is just a number, like right now in Texas it's 12/8/2004 8:16 AM and the Date/Time VALUE is 38329.34498. 12/8/2004 8:16 AM is ONLY what is formatted as DISPLAY.

So if I enter a 9 in Excel and format it as Date/Time, Excel will display 1/9/1900 12:00:00 AM, which is the NINTH day from the MS OFFICE START DATE REFERENCE POINT, ZERO hours, or 12 AM.

The QUICKEST data entry is to follow pbrodsky's suggestion.


Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top