View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default date / time format - and nested formulas selecting from a range

On Wed, 19 Aug 2009 19:54:01 -0700, NinasNumber
wrote:

I am trying to identify compliance with a shuttle departure based on peak
time criteria, or non peak time criteria. My worksheet data is copied from
an online gps report, which has the cell for departures and arrivals as a
date time format.
Identifying the time between departures is a simple subtraction formula.
When all relevant columns are simply time with no date, this formula works:
I have 2 peak times and non peak times identified in the top of the sheet,
and an end time for the shuttle.

=IF(E18=npk, IF(E18=peakaft, IF(E18=nonpeakeve, IF(E18=$F$12,"No
Shuttle","NonPeak"),"Peak"),"Non Peak"),"Peak")

I either need to convert the column with the date time data to just time (it
doesn't work with formatting the cell, I would need to trim the cells--- ) --
I tried Mod(a1,1) which strictly shows the time, but the date data is still
buried, making the above formula useless...


If the values in E18 are the date-time that you are trying to make just a time,
and the other entries represent merely "time", then try:

=IF(mod(E18,1)=npk, IF(mod(E18,1)=peakaft, IF(mod(E18,1)=nonpeakeve,
IF(mod(E18,1)=$F$12,"No Shuttle","NonPeak"),"Peak"),"Non Peak"),"Peak")
--ron