Thread: if statement
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Date based IF Statement

If I understand you correctly, with the Start date in C3, and a Closed date
in E3 then in D2 enter the formula:

=IF(TODAY()<C3,"",IF(AND(E3<"",E3<C3),"Error in
dates!",IF(E3="",TODAY()-C3,MIN(TODAY(),E3)-C3)))

This will display the number of days since the start date, wherther of not
there is a Closed date entered, but will stop counting when the Closed date
is reached. That is even if there is a Closed date entered, it will still
only show the number of days since the Start date until the Closed date is
reached.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


<FXone wrote in message .. .
maybe you can help solve this one..

=IF(TODAY()=C3,0,NOW()-C3-1)

the days open are counted based on a start date manually inputed in C3, a
closed date is manually inputed in a separate cell, for instance C4. I am
trying to craft my IF statement to stop counting days open based on the
closure date. Any suggestions? Thx

for example:

DtOpen Days Open DtClosed
05/1/08 26
05/1/08 24 05/25/08