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
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Diffy

Well-known Member
Joined
Dec 22, 2006
Messages
512
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))
 

Dan Waterloo

Well-known Member
Joined
Jan 4, 2007
Messages
874
In B1:

=IF(WEEKDAY(A1,2) <= 5,
A1 - WEEKDAY(A1, 2) + 1,
A1 - WEEKDAY(A1, 2) + 8)
 

Dan Waterloo

Well-known Member
Joined
Jan 4, 2007
Messages
874
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.
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,499
Messages
5,596,515
Members
414,074
Latest member
Matthew Kakde

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
Top