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

I hate to ask this, but would you mind explaining the formula to me in words.
I'm a little lost as to how the AND, ROUNDOWN,INT & LOOKUP operate. Also,
what is the purpose/functionality of the curly brackets? I have looked them
all up in Excel Help, but I'm not quite making sense of them. I've decided to
go with this formula as it does suite me best, so I'd really like to get a
handle on what all I'm typing so the next time I have a similar problem to
solve I won't have t look for help. Thanks in advance for all your help.

"fair_thumb" wrote:

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.