ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula has to take Monday if due date falls on a Sunday (https://www.excelbanter.com/excel-worksheet-functions/85828-formula-has-take-monday-if-due-date-falls-sunday.html)

Revathi

Formula has to take Monday if due date falls on a Sunday
 
I have a large formula to calculate due date under different conditions.If
this due date is on a Saturday ,Sunday or on a holiday, it has to cconsider
Monday or next working day, as applicable.

Bob Phillips

Formula has to take Monday if due date falls on a Sunday
 
=due_date+(WEEKDAY(due_date,2)5)+(WEEKDAY(due_dat e,2)=6)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Revathi" wrote in message
...
I have a large formula to calculate due date under different conditions.If
this due date is on a Saturday ,Sunday or on a holiday, it has to

cconsider
Monday or next working day, as applicable.




Ron Rosenfeld

Formula has to take Monday if due date falls on a Sunday
 
On Fri, 28 Apr 2006 02:21:02 -0700, Revathi
wrote:

I have a large formula to calculate due date under different conditions.If
this due date is on a Saturday ,Sunday or on a holiday, it has to cconsider
Monday or next working day, as applicable.


With your list of holidays in holiday_range, try this formula:

=WORKDAY(your_formula - 1,1,holiday_range)

If the WORKDAY function is not available, and returns the #NAME? error, install
and load the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.


--ron


All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com