Thread: datedif problem
View Single Post
  #12   Report Post  
bill gras
 
Posts: n/a
Default datedif problem

Hi Ron

your formula works fine , but as cell AG44 is blank as a result of a work
sheet
function I can only get the result of the difference between AG44 and TODAY()
I tried your formula with an empty cell (no formula) and no problem it works
fine.

This is the formula that is in cells AG44 to AG3000 it is an array formula
every so many rows there is number that is greater than 1 and the rest are
blank
using the belowe function

=IF(OR(ISNUMBER(AF43),ISBLANK(AF44)),"",AVERAGE(LA RGE(AF44:INDEX(AF45:AF$65536,MATCH(TRUE,ISBLANK(AF 45:AF$65536),0)),ROW(INDIRECT("1:"&MIN(5,MATCH(TRU E,ISBLANK(AF45:AF$65536),0)))))))

regards bill
--

bill gras


"Ron Rosenfeld" wrote:

On Fri, 28 Oct 2005 05:21:08 -0700, bill gras
wrote:

Hi Ron
Your formula only returns Datedif between Today()-T44 and does not
return the difference between T44-T45 if AG44 is blank

bill
--
bill gras


It's not my formula, but I don't understand what you are saying.

=IF(AG441,TODAY()-T44,T44-T45)

Did you actually try it? If AG44 is blank, it will return a zero which, in my
world, is less than 1. Therefore the logical_test evaluates to FALSE, and the
value_if_false will be returned.

Here are some sample runs:

T44: 15 Feb 2005
T45: 19 Feb 2005

AG44: <blank -- -4 (difference between T44-T45)
AG44: 2 -- 255 (difference between T44 and TODAY())


--ron