Weekend calculation question

dawnfoss

Board Regular
Joined
Apr 22, 2002
Messages
100
Hi

Can someone help me with a formula that will return the following:

If A1 = monday through friday then B1= A1 (monday)
If A1 =saturday then B1=A1+2 (monday)
If A1= sunday then B1=A1+1 (monday)

Thanks!
dawn
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
in B1 Try (format B1 as a date):

if(and(Weekday(A1)>1, Weekday(A1)<7),A1,if(weekday(A1)=7,A1+2,A1+1))
 
Upvote 0
Dawn:

My formula is assuming that if a Monday to a Friday date is in A1 then you want the Monday date from that week, whereas if A1 contains a Saturday or Sunday date then you want the Monday date from the next week.
 
Upvote 0
I'm assuming that A1 contains a date and you want the next weekday. You could use WORKDAY function from Analysis ToolPak, i.e.

=WORKDAY(A1,1)

or without Analysis ToolPak

=A1+CHOOSE(WEEKDAY(A1),1,1,1,1,1,3,2)
 
Upvote 0

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

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