|Can't get it to work - it keeps giving me a #NAME error.|
Here is some actual data.
M4 - 4/10/2011
N4 - 6/1/2010
O4 - 313 (number of days between M4 and N4)
R1 - 6/30/2010
R2 - 365 (days in fiscal year)
S1 - 6/30/2011
S2 - 366 (days in fiscal year)
In R4 I used formula: =IF($M4<$R$1,$O4,DATEDIF($N4,$R$1,"d")) and it works except when the N1 is 7/1 - because the datedif needs to have the larger number first in the formula or you get an error).
In S4 I used formula: = =IF($M4>$S$1,$S$2,SUM($O4-$R4)) and so on for T4, U4, etc... and just adding to the subtraction in the last Sum formula.
I am getting errors when N=7/1/2010 and a couple of weird calculations that I am trying to figure out why they aren't working since others that are similar in data are working just fine.
Does this help?