Excel (2007) "workday" how to add days to a date and include saturday, for a schedule.

drg7001

New Member
Joined
Dec 17, 2015
Messages
10
Hello All,

I am new to Excel, and working on a project timeline.

I am trying to insert a number of days in column "b" for the amount of time each job will take.

In column "c" I have the start date, and in column "d" i have the end date.

I would like it to work so that when I enter the days to complete and the Start Date entered, it will automatically calculate the End Date (using working days) and include Saturdays. I do not need holidays included.

For example: B7: Duration: 22 days
C7: Start date: 2/15/2016
D7: End Date: 3/10/2016 - (I have tried numerous different macros with no success, I usually come up with 3/08/2016 or 3/16/2016).


The problem with most macros are that they used "networkdays" and needed a start and end date, I do not want to use a start and end date however, I need the macro to be placed in the end date column, so that when I change my duration, it automatically calculates the end date.

I have also tried using workday2 from here Better Workday but it would not work for me.

Thank you for your time.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I am looking for any solution I can get to work at this point. I will check them out right now, to be sure. Thank you!
 
Upvote 0
XL2007... I am trying to get approved for the 2010 version atm.

Thank you, if I get the download approval, I will try that!
 
Upvote 0
Ok, this isn't pretty, but I think it works..
Put this code in a new standard module
Code:
Public Function CountSaturday(strt As Date, cnt As Long)
Dim MyDate As Date, MyDates() As Date, x As Long
MyDate = strt
x = 0
Do Until x = cnt
    If Weekday(MyDate) = vbSunday Then
    Else
        ReDim Preserve MyDates(0 To x)
        MyDates(x) = MyDate
        x = x + 1
    End If
    MyDate = MyDate + 1
Loop
CountSaturday = MyDates(UBound(MyDates))
End Function

And use it like
=CountSaturday(C7,B7)

C7 is start Date, B7 is duration.
 
Upvote 0
Okay, I tried that, but it came back as an error: #NAME?

This is exactly what I did, just in case I did something wrong.

I made a new sheet.
Then I right clicked, and clicked the "View Code" selection
Then pasted in the script and hit Alt, Q
Then saved.
I then, copied and pasted =CountSaturday(C7,B7) into D7 (FINISH DATE)
 
Upvote 0
Okay, I did exactly as you said and then entered the macro. At first it came up as #NAME?

Then after left clicking D7 again, it came up as 1/0/1900 for the finish date
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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