Incorrect Am and Pm

G

Guest

I have two columns say A and B. In these two columns I enter the time in and
time out. Everything works fine till I reach 12:00 PM. Then for some reason
excel forgets whether it is Am or Pm. Is there some way to get it to not
switch back to Am?
Second question: I also subtract the two columns to get a total time spent
for each activity. If I have the start time entered in column A but no end
time in column B I recieve an error message which throws off my running
totals. Can I fix it so that it will not run the total until I have entered
a time in column B?
Thanks in advance,
Steve
 
B

Biff

Hi!

Take this simple test:

1:00

Is that 1:00 AM or 1:00 PM? Can't tell? Well, how is excel supposed to know?

13:00

I'll bet you can tell that is 1:00 PM

If you enter the time without the AM or PM on a 12hr clock it will default
to AM.

For your formula problem:

Hard to make a suggestion without knowing what the actual formula is. Maybe
something like this:

=IF(B1="","",your_formula))

Biff
 
D

David McRitchie

Hi Black,
Subtracting times before midnight from a time after midnight is
done by adding 24 hours first. Since time is a fraction of a day
the addition of 1 day is what is added.

= endtime - starttime + (endtime < starttime)

= C2 - B2 + (C2<B2)

More information on Date and Time
http://www.mvps.org/dmcritchie/excel/datetime.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel Catagorise AM or PM 7
Separate AM/PM from time. 2
AM/PM Format 6
AM /PM formula help please 6
VBA- Excel Programming:- 0
Excel Subtracting multiple columns from another column 3
Difference of Time 1
Input Time in AM/PM 3

Top