So am creating a macro that inserts a column and part of what it needs to do is to put next years date afterwords. I at first simply had +365 to adjacent cell to get one year later. I then encountered that Excel accounted for leap year so I created this function. =IF(IF(OR(MOD(J3,400)=0,AND(MOD(J3,4)=0,MOD(J3,100)<>0)),"Leap Year","NOT a Leap Year")="Leap Year",J3+366,J3+365). (the previous year being located in J3).
Basically it starts with a function determining whether or not it is leap year and then based on that result either adds 366 or 365. Problem is when I hit 2015 It adds 366 and goes over to 1/1/2016 instead of 12/31/2015. In visual right now I get 12/30/2020 , 12/31/2019 , 12/31/2018 , 12/31/2017 , 12/31/2016 , 1/1/2016 , 12/31/2014 , 12/31/2013 , 12/31/2012 , 12/31/2011 , 12/31/2010. Going from right to left.

Any Ideas on what I'm doing wrong? I'm sure its something stupid.