Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default formual to determine if date falls on weekend, adjust date to Mond

Hi I am using excel to show project timeline. I want to determine if the day
falls on saturday or sunday. If the day of week falls on the weekend I will
add the appropriate number of days to bring the new date to the start of the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default formual to determine if date falls on weekend, adjust date to Mond

Have you looked at the WORKDAYS function? I think it does what you need --
and more since it can also 'jump' holidays
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Bradley" wrote in message
...
Hi I am using excel to show project timeline. I want to determine if the
day
falls on saturday or sunday. If the day of week falls on the weekend I
will
add the appropriate number of days to bring the new date to the start of
the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default formual to determine if date falls on weekend, adjust date to Mond

On Fri, 21 Nov 2008 08:15:00 -0800, Bradley
wrote:

Hi I am using excel to show project timeline. I want to determine if the day
falls on saturday or sunday. If the day of week falls on the weekend I will
add the appropriate number of days to bring the new date to the start of the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley


Something like:

=WORKDAY(A1+A2-1,1)

where A1 is your start date, and A2 is the numboer of days of work expected.

Note that if you only want to add working days, then you should use:

=workday(a1,a2)

Also note that there is an optional Holidays argument (see HELP).

If the WORKDAY function -- #NAME error, see HELP for that function for
instructions on how to correct it.
--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default formual to determine if date falls on weekend, adjust date to

That worked great!!, Thank you,

best wishes,

Bradley

"Bernard Liengme" wrote:

Have you looked at the WORKDAYS function? I think it does what you need --
and more since it can also 'jump' holidays
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Bradley" wrote in message
...
Hi I am using excel to show project timeline. I want to determine if the
day
falls on saturday or sunday. If the day of week falls on the weekend I
will
add the appropriate number of days to bring the new date to the start of
the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default formual to determine if date falls on weekend, adjust date to Mond

Hi,

Suppose your end date is in cell B1 then

=B1+IF(WEEKDAY(B1,2)=6,2,IF(WEEKDAY(B1,2)=7,1,0))

Calculated the ending date after any necessary adjustments for the weekend.
A shorter version is

=B3+IF(MOD(B3,7)=0,2,IF(MOD(B3,7)=1,1))

If this helps, please click the Yes button

cheers,
Shane Devenshire

"Bradley" wrote:

Hi I am using excel to show project timeline. I want to determine if the day
falls on saturday or sunday. If the day of week falls on the weekend I will
add the appropriate number of days to bring the new date to the start of the
work week.

basically I have a cell with my starting date, then add the number of days
of work expected and get an ending date. if the ending date falls on a
weekend then I want to adjust the ending date appropriately.

for example;
if (day=saturday) day=day+2
if (day=Sunday_)day=day+1

thanks for your help

Bradley

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a formula to determine if date falls within a date range then Corca Excel Worksheet Functions 2 September 19th 08 09:36 AM
If weekend date display previous Friday date jimar Excel Discussion (Misc queries) 4 September 17th 08 03:01 PM
If date in cell falls between date range... Keep It Simple Stupid Excel Worksheet Functions 4 August 28th 07 10:02 PM
Need true or false if a date falls between a date range dustin Excel Worksheet Functions 3 December 9th 06 02:01 AM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM


All times are GMT +1. The time now is 10:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"