Count Leap Years
This formula will count leap years between 2 dates. Note a) the date in B1 must be in the same or greater year than A1 to work and b) it seems to work correctly with the Gregorian calendar. (The Gregorian calendar seems to be the one in use in most countries but you might want to check just in case)

=DATE(YEAR(B1),1,1)-DATE(YEAR(A1),1,1)-((YEAR(B1)-YEAR(A1))*365)+AND(MONTH(DATE(YEAR(A1),2,29))=2,MONTH(DATE(YEAR(B1),2,29))=2)*1



© Copyright 2004 - 20067 andrewsexceltips.net All Rights Reserved.