conditional sunday formula

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
[TABLE="width: 681"]
<tbody>[TR]
[TD][TABLE="width: 681"]
<tbody>[TR]
[TD]COLUMN A COLUMN B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 681"]
<tbody>[TR]
[TD]START OF CLASSES[/TD]
[TD]6-Aug-18[/TD]
[/TR]
[TR]
[TD]EMAIL OF LIST OF PROMOTED STUDENTS OR NEW STUDENTS[/TD]
[TD]5-Aug-18[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

In the above example Cell B2 has the formula B2-1
I want it to change to B2-1+1 if the value of B2-1 is sunday
or B2-1+2 if B2-1 is saturday[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hello,

Excel 2016 (Windows) 32 bit
AB
InfoTerm
START OF CLASSES
EMAIL OF LIST OF PROMOTED STUDENTS OR NEW STUDENTS

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]2018-08-06[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]2018-08-06[/TD]

</tbody>
Arkusz1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]B3[/TH]
[TD="align: left"]=IF(WEEKDAY(B2-1,2)=7,B2,IF(WEEKDAY(B2-1,2)=6,B2+1,B2-1))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Note that B2-1+1 can be wrote as B2, and B2-1+2 can be wrote as B2+1. :)

P.s. Oh. You need to adjust date to your regional format, as YYYY-MM-DD is in my country and your excel might not understand this.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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