View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Military Time Conditional Format

Military time and 24 hour time is different, 24 hour time is when 6:00 PM is
written 18:00.
It is the default Excel time, military time like 1900 is different, you
would need to convert it to real time values before you can make any
calculations with 30 minutes etc since 1900 is 1900 to Excel, not a time
value. To convert 1900 to 19:00 you can use this formula


=--(TEXT(A1,"00\:00"))


assuming A1 holds 1900 and you need to format the cell with the formula as
hh:mm

Where would the next entry be, in A2 and do you want to calculate if the
next entry is earlier than 21:00 or if it is later than or equal to 21:30?

=IF(--(TEXT(A2,"00\:00"))<TIME(21,0,0),"Early",IF(TEXT(A 2,"00\:00")-TIME(0,30,0)=TIME(21,0,0),"Late","On
Time"))



--
Regards,

Peo Sjoblom





"stevieboy1313" wrote in message
...
Hello, what formula could I use to set conditional formatting on a page
that
has 24 hour time for the entries? For example, if the entry in A1 is 1900,
and the next entry is due at 2100, how can I get the spreadsheet to show a
warning if the entry is early? Or if it's more than 30 minutes late late?

I'm using XP Pro and Office 2003, and I'm a beginner, so please keep it
simple.