military time calculations

N

NedG

I am trying to write a program that tracks time entries in "Military time"
and then average multiple entries, that cover a 24 hour cylcle for three
shifts. I have 90% of the formulas in place but have run into a snag. I
need to figure per hour, the number of calls and the average time each took
from call in to completion. There will be some hours without any calls and
some with several. I need to examine each entry to see when the call came in
and when completed, then take the elapsed time and store in a separate cell
to be averaged together with other entires from the same hour. When I use
the IF Statement to examine the times entered, As in B2>7, I get a
#NAME error, but when I use B2<8 Excel returns true. Anytime I examine the
entry, "less than" it returns true, but when it is "greater than" excel
returns #NAME I can not use = to as most of the entries will have
variuos minutes. The times will be between say 07:00 to 08:00 to 09:00
etc. through out the 24 hour cycle. I have not progressed to the "count" of
these entries yet. Time is most important.
 
J

Jacob Skaria

The conditions should be

B2>TIMEVALUE("7:00")
B2>(7/24)

B2<TIMEVALUE("8:00")
B2<(8/24)


If this post helps click Yes
 
D

David Biddulph

Tell us exactly what formula you've used that gives #NAME!.
There is nothing in B2>7 which will return #NAME!

Additionally, Jacob has pointed out that you can't test 07:00 against 7, as
Excel times are stored as proportions of a day, not as a number of hours.
 

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

Top