info overload
New Member
- Joined
- Nov 8, 2016
- Messages
- 22
Hello all,
I am building a sheet where I am comparing sales to the same day of the week between years and account for leap year. So in the same row I need the Mondays to line up. "=Cell+365" doesn't work for either of my requirements.
In my research I found this formula: =DATE(YEAR(B7)-1,MONTH(B7),DAY(B7))+WEEKDAY(B7)-WEEKDAY(DATE(YEAR(B7)-1,MONTH(B7),DAY(B7))) it figures the previous year and rearranging the formula it is so close but it screws up the leap year as you can see in my example.
Any advise from the excel wizards?
Thanks in advance.
I am building a sheet where I am comparing sales to the same day of the week between years and account for leap year. So in the same row I need the Mondays to line up. "=Cell+365" doesn't work for either of my requirements.
In my research I found this formula: =DATE(YEAR(B7)-1,MONTH(B7),DAY(B7))+WEEKDAY(B7)-WEEKDAY(DATE(YEAR(B7)-1,MONTH(B7),DAY(B7))) it figures the previous year and rearranging the formula it is so close but it screws up the leap year as you can see in my example.
Any advise from the excel wizards?
Thanks in advance.