View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Excel 2007 - calculating % of a year that has elapsed

"john" wrote:
How do I calculate what percentage of a year has elapsed?
I have the date 31/12/09 in cell A1 and the date 31/05/09 in cell B1 and
then I do this: =B1/A1*100 but this formula is wrong.How should I do the
calculation?


One way:

=(B1 - date(year(B1)-1,12,31)) / (A1 - date(year(B1)-1,12,31))

FYI, you do not need A1. You could do:

=(B1 - date(year(B1)-1,12,31)) / (date(year(B1),12,31) -
date(year(B1)-1,12,31))