Find day of the week next year

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.
 

Attachments

  • excel help.png
    excel help.png
    33.1 KB · Views: 21

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Isn't it the same as =B7+364 ?

This is where you eat crow and admit some times you have a brain fart. I tried to prove your statement right and you are indeed correct. I looked back at my original post and discovered my error is =cell+365. I was so focused on the problem the solution evaded me.
 
Upvote 0
Hah, just did what I should have done first, which was to look at the screen shot. I was really off on a tangent.

No! Seriously, I really did enjoy seeing what came out of your formulas. I have been working on this problem for a few days but keep getting side tracked going..."Look what I did!...Squirrel!...Ohh shiny! "
 
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top