View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
barry houdini[_4_] barry houdini[_4_] is offline
external usenet poster
 
Posts: 57
Default calculate number of days

"Maybe linked to a date of 31/01/09? and then when i change the date
to feb (28/02/09) the number of feb days are shown?"

Given you have the last day of the month in question in D1 then you
can adapt Lars' suggestion as follows:

=MAX(0,MIN(C2,D$1)-MAX(B2,D$1-DAY(D$1)))