View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
fair_thumb fair_thumb is offline
external usenet poster
 
Posts: 5
Default Tricky IF/Then Date based formula needed

one way
with date on A2 formatted as "ddd, mm/d/yy, h:mm"

=IF(AND(HOUR(A2)=7,ROUNDDOWN((A2-INT(A2)),8)<=(LOOKUP(WEEKDAY(A2),{1,2,3,4,5,6,7},{ 16,20,20,20,20,20,15}))/24),"On Time","Closure Time")

the 20:00 is tricky! <g

"Titanium" wrote:

Column A has the date and time displayed: Thu, 06/14/07, 11:15
Column B needs to calculate: "If (A=Mon to Fri from 7:00 to 20:00, Sat from
7:00 to 15:00, Sun from 7:00 to 16:00 Then Display in Column B "On Time")
If False then Display in Column B "Closure Time")

I don't even know where to start with this one. Any assistance would
certainly be appreciated. Thanks in advance for your help.