View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Alan Moseley Alan Moseley is offline
external usenet poster
 
Posts: 75
Default Function returning unexpected value

Are you sure that you are subtracting 7/17/09? Try removing the 'TODAY()-'
to see what date you are actually subtracting. If it doesn't change then you
must have a cell blank which is then performing a different part of the IF
statement.
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Paul" wrote:

I am using Excel 2007.

I have the function:
=IF(AND(ISBLANK(Milestones[[#This Row],[Actual Completion
Date]]),ISBLANK(Milestones[[#This Row],[Updated Projection
Date]])),TODAY()-Milestones[[#This Row],[Baseline Planned
Date]],IF(AND(ISBLANK(Milestones[[#This Row],[Actual Completion
Date]]),(ISBLANK(Milestones[[#This Row],[Updated Projection
Date]]=FALSE))),TODAY()-Milestones[[#This Row],[Updated Projection
Date]],Milestones[[#This Row],[Actual Completion Date]]-Milestones[[#This
Row],[Baseline Planned Date]]))

I am expecting to get the value of 5 (today - 7/17/2009). Instead, I am
getting -39992. Can anyone help me find where I am going wrong? I have
looked for so long that I am unable to locate my error.


Thank you,

-- Paul