Date Differences in Excel

I was looking to calculate if someone was under 27 years old; this can Be quite tricky but excel has just the function, =DATEDIF().

=DATEDIF(B3,DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())),"y")

returns the number of years between NOW and date held in cell B3. (It handles all the year rounding and leap years so there’s no need to worry about rounding etc.

IF(DATEDIF(B3,DATE(YEAR(NOW()),MONTH(NOW()),DAY(NOW())),"y")>25,1,0)

will return true (1) or false (0) depending on if the difference between the dates is greater than 25 years of not.

I used the www.cpearson,com site as my guide.

Related Posts

  • Microsoft Office Templates With Office 2010, the location of the "My Templates" folder for Excel is managed using […]
  • Disqus This is page contains complex html i.e. javascript, the page must only be edited as […]
  • Snipsnap and the ‘html’ macro One of the add on features contributed  by the community to the snipsnap project was an […]
  • ERP Obviously ERP has been around a while, in my researches, I came across these two open […]
  • RCS Revision Control System, one of the grand daddies of them all. I still use it because […]

Leave a Reply

Your email address will not be published. Required fields are marked *