WEEKDAY & TODAY function.

bedgar

New Member
Joined
Feb 25, 2019
Messages
3
Hi Everyone!

So I have an Excel doc that I print out for a hand written report. I have a week beginning cell that should always show the upcoming Monday date, UNLESS today is Monday, then it should show today's date. I usually print this out on Friday, but last week did not have time to get it done. So today I open it for the first time on a Monday and it is showing me next Monday's date.

This is the code I was using which worked great if not a opened on Monday:
Code:
=TODAY()+(7-WEEKDAY(TODAY(),2)+1)

So I attempted to modify it and at first thought I nailed it. To test I set my computer date to a Thursday and opened it up. It showed the date for that Thursday and not the upcoming Monday as expected. Here is that faulty code:
Code:
=IF(WEEKDAY(TODAY()=2),TODAY(),TODAY()+(7-WEEKDAY(TODAY(),2)+1))

Any help is appreciated.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Re: Help with a WEEKDAY & TODAY function.

Hi & welcome to MrExcel
Try
=IF(WEEKDAY(TODAY(),2)=1,TODAY(),TODAY()+(7-WEEKDAY(TODAY(),2)+1))
 
Last edited:
Upvote 0
Re: Help with a WEEKDAY & TODAY function.

You're welcome & thanks for the feedback
 
Upvote 0
Re: Help with a WEEKDAY & TODAY function.

I know you asked for WEEKDAY and TODAY, but here is a shorter way:
=WORKDAY.INTL(TODAY()-1,1,"0111111")

Format as date.
 
Upvote 0
Re: Help with a WEEKDAY & TODAY function.

Here is a shorter way with WEEKDAY and TODAY:

=TODAY()+7-WEEKDAY(TODAY(),12)
 
Upvote 0
Re: Help with a WEEKDAY & TODAY function.

Thanks Scott and Tetra. Simplified is definitely better. I have been humbled like always. You guys all rock!
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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