FAQ 
Calendar 


#1




How can I get Excel to calculate the number of calendar days?
I'm trying to calculate the number of calendar days between two dates in Excel. Unfortunately, Excel seems to default to a 360day calendar, so when my start date is (for example) October 1, 2006 and my end date is October 31, 2006 Excel returns the number of days as 30.
I need it to return the number of days as 31. How do I do this? 
Advertisements  

#2




Quote:
In any case, you could enter a function in that field. Where B2 = 10/31/2006 and A2 = 10/1/2006: =(B2A2)+1 Make sure that the formula field is designated a Number datatype, not Date. 
#3




Unfortunately, that won't work (adding 1) because my boss needs to be able to also, say, enter November 1 and November 30 and have it equal 30 days.

#4




Quote:
In any case, it has nothing to do with a "360 day year" (??) and your formula (adding +1 to the difference) will always work. 


#5




Quote:

#6




Try this:
=INT(DATEDIF(cell1, cell2, "d") + 1) 
#7




Oops. Yeah, that worked.

#8




I take it back. Dervorin's formula resulted in what I wanted. (There's more to the formula. I need to also multiply the number of calendar days times the number of hours between 6am and midnight times the number of units we have available each hour. This is for radio rates, btw.) Using DATE360 plus 1 didn't get me the correct number when I added the rest of the formula, but Dervorin's version did.
As an aside, I hope the SDMB never ever gets blocked by my IT department. If it does just working on this damn spreadsheet alone is three instances where I've used you all for work purposes. 
Reply 
Thread Tools  
Display Modes  

