View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] joeu2004@hotmail.com is offline
external usenet poster
 
Posts: 418
Default Two TRUE to one FALSE statement

bluebird wrote:
Would like to create a formula that can return one of two true outcomes vs.
one false. For example:
if date2 (c2) < date1 (b2), then "early",
if date2 (c2) = date1 (b2), then "on time",
if date2 (c2) date2 (b2), or if %(d2)<1, then "late".
Can this be done?


Your logic is a little unclear. I interpret your last condition to
mean that even if c2 <= b2 (the first two conditions), you consider it
"late" if d2 < 1. Therefo

=if(or(c2b2, d2<1), "late", if(c2<d2), "early", "on time"))

Note that we do not need to explicitly test if(c2=d2) for the "on time"
result. That is implied by the left-to-right ordering of the tests,
namely it is not c2b2 and it is not c2<b2.