How to display a specific formula value as a 0

1

I am using the DAYS360 formula to count how many days since last activity from a predefined date

=DAYS360($R15,$X$1)

The R Column reports on last activity date, whilst the the X1 cell contains the current date.

All is good except for when the there is no date in Column R. The formula then spits out an amount of days of 40753 (this increases day by day).

How to i add to my above formula so that if the value is >= 40753 the value returned is 0 or NO ACTIVITY?

Rohan F

Posted 2013-03-13T01:42:47.743

Reputation: 69

Note that DAYS360 is an accounting function which treats each month as 30 days (as the name suggests) so it doesn't give an accurate count of days in all cases, e.g. =DAYS360(DATE(2013,3,30),DATE(2013,4,1)) gives a result of 1 - but those dates are 2 days apart - if you want an accurate number of days between two dates just subtract the earlier from the later, e.g. in your case =IF($R15="","",$X$1-$R15) – barry houdini – 2013-03-13T11:59:50.897

Answers

1

Alternatively, only calculate if ColumnR value exists: =IF(ISBLANK($R15),0,DAYS360($R15,$X$1))

pnuts

Posted 2013-03-13T01:42:47.743

Reputation: 5 716

Excellent pnuts!! i used the ISBLANK version and displayed "NO ACTIVITY", instead of 0. Now when i pivot this data the value in the pivot displays as DIV/0, how can i also make the this read no activity or 0? – Rohan F – 2013-03-13T03:01:12.577

2

You can use an IF

=IF(DAYS360($R15,$X$1)>=40753, 0, DAYS360($R15,$X$1))

Brad Patton

Posted 2013-03-13T01:42:47.743

Reputation: 9 939