View Single Post
  #9   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

Thanks so much for your reply! That is an interesting approach. I will try it
and get back to you. I can't believe so many replied.

"Arvi Laanemets" wrote:

Hi

Add an additional sheet (p.e. Times - you can hide it later)
On sheet times, create a table
1 16:00
2 20:00
7 17:00

(In column A day numbers for Sunday, Monday and Saturday, in column B
according closure times)

Now your formula for B2 will be
=IF(AND(MOD(A2;1)=(7/24),MOD(A2,1)<=CHOOSE(MATCH(WEEKDAY(A2),Times!$A$1 :$A$3,1),16/24,20/204,17/24)),"On
Time","Closure Time")
etc.


Arvi Laanemets


"Titanium" wrote in message
...
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.