Calculating percent complete based on work days

leighsha101

New Member
Joined
Mar 20, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to sort out how to determine what percent of a project is complete. I can figure out calculating the percent of days between two dates using this formula: =(DATEDIF([@[Start Date ]], TODAY(),"d")+1)/(DATEDIF([@[Start Date ]], [@[Due Date ]], "d")+1). But, this doesn't account for weekends. I know how to find number of days excluding weekends using the NETWORKDAYS.INTL. What I can't figure out, is how to make these calculations together. How do I determine what percent of a project is done, based on today's date, but excluding any weekend days.

Please help!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi, try this:

Book1
AB
1Holiday:Mon, 2023-03-13
2Wed, 2023-03-018%
3Thu, 2023-03-0215%
4Fri, 2023-03-0323%
5Sat, 2023-03-0423%
6Sun, 2023-03-0523%
7Mon, 2023-03-0631%
8Tue, 2023-03-0738%
9Wed, 2023-03-0846%
10Thu, 2023-03-0954%
11Fri, 2023-03-1062%
12Sat, 2023-03-1162%
13Sun, 2023-03-1262%
14Mon, 2023-03-1362%
15Tue, 2023-03-1469%
16Wed, 2023-03-1577%
17Thu, 2023-03-1685%
18Fri, 2023-03-1792%
19Sat, 2023-03-1892%
20Sun, 2023-03-1992%
21Mon, 2023-03-20100%
Sheet1
Cell Formulas
RangeFormula
B2:B21B2=NETWORKDAYS.INTL($A$2,$A2,1,$B$1)/NETWORKDAYS.INTL($A$2,$A$21,1,$B$1)
 
Upvote 0
The above also includes a holiday schedule (The date I chose as a Holiday is just made up.) You can take it out, it is not a required argument.
 
Upvote 0
1679362839556.png

Here is what I am working with. The 'Bathroom demo' (highlighted yellow) occurs within the work week (Mon-Wed) and calculates correctly. It started today and we should be 1/3 completed based on it taking 3 days. For 'Tile - shower / floors' (highlighted green), there is a total of 8 days start to end. Two of those days, however, are Saturday and Sunday, which wouldn't count towards percent complete. The 'Projected % Complete' (circled in red) calculates based on start and due date but doesn't account for weekends. So, if I wanted to check on say, 3/28/23, to find out what percent complete the project is, it'll give me the wrong percent because it is calculating we worked on the task two days more than actual.

We are trying to calculate how much of a task/project is done on the current date / today, based only on actual days worked, not total days, between start and due dates. Is this possible? I am not opposed to doing additional side calculations, just unsure what they would be.

My appreciation!
 
Upvote 0
View attachment 87963
Here is what I am working with. The 'Bathroom demo' (highlighted yellow) occurs within the work week (Mon-Wed) and calculates correctly. It started today and we should be 1/3 completed based on it taking 3 days. For 'Tile - shower / floors' (highlighted green), there is a total of 8 days start to end. Two of those days, however, are Saturday and Sunday, which wouldn't count towards percent complete. The 'Projected % Complete' (circled in red) calculates based on start and due date but doesn't account for weekends. So, if I wanted to check on say, 3/28/23, to find out what percent complete the project is, it'll give me the wrong percent because it is calculating we worked on the task two days more than actual.

We are trying to calculate how much of a task/project is done on the current date / today, based only on actual days worked, not total days, between start and due dates. Is this possible? I am not opposed to doing additional side calculations, just unsure what they would be.

My appreciation!
Edit: The 'Projected % Complete' (circled in red) calculates based on current date within the start and due dates but doesn't account for weekends.
 
Upvote 0
May be:
Code:
=IF(AND(TODAY()>=[@[Start Date]],TODAY()<=[@[Due Date]]),NETWORKDAYS.INTL([@[Start Date]],TODAY(),1)/NETWORKDAYS.INTL([@[Start Date]],[@[Due Date]],1),"")
 
Upvote 0
You can use the NETWORKDAYS.INTL function to calculate the number of workdays between two dates, and then divide that by the total number of workdays in the project to get the percentage complete. Here's an example VBA code that does this:
VBA Code:
Sub CalculateProjectProgress()
    Dim startDate As Date
    Dim dueDate As Date
    Dim totalWorkDays As Integer
    Dim completedWorkDays As Integer
    Dim progressPercent As Double
    
    ' Get the start and due dates from your worksheet
    startDate = Range("A1").Value
    dueDate = Range("B1").Value
    
    ' Calculate the total number of workdays in the project
    totalWorkDays = Application.WorksheetFunction.NetworkDays_Intl(startDate, dueDate, 1)
    
    ' Calculate the number of completed workdays
    completedWorkDays = Application.WorksheetFunction.NetworkDays_Intl(startDate, Date, 1)
    
    ' Calculate the progress percentage
    progressPercent = completedWorkDays / totalWorkDays
    
    ' Write the progress percentage to your worksheet
    Range("C1").Value = progressPercent
End Sub
In this example, the start date is in cell A1, the due date is in cell B1, and the progress percentage is written to cell C1. You can adjust the cell references as needed for your worksheet. Note that the NETWORKDAYS.INTL function uses the "1" argument to exclude weekends; you can adjust this argument to exclude other types of holidays if needed.
 
Upvote 0
View attachment 87963
Here is what I am working with. The 'Bathroom demo' (highlighted yellow) occurs within the work week (Mon-Wed) and calculates correctly. It started today and we should be 1/3 completed based on it taking 3 days. For 'Tile - shower / floors' (highlighted green), there is a total of 8 days start to end. Two of those days, however, are Saturday and Sunday, which wouldn't count towards percent complete. The 'Projected % Complete' (circled in red) calculates based on start and due date but doesn't account for weekends. So, if I wanted to check on say, 3/28/23, to find out what percent complete the project is, it'll give me the wrong percent because it is calculating we worked on the task two days more than actual.

We are trying to calculate how much of a task/project is done on the current date / today, based only on actual days worked, not total days, between start and due dates. Is this possible? I am not opposed to doing additional side calculations, just unsure what they would be.

My appreciation!
I'm pretty sure the formula in post number 2 does that. If not please explain what I have have missed. I had no idea you were thinking of tasks within the project. Does this work better?:

mr excel questions 15.xlsm
ABCD
1Current Date:2023-03-21Holiday:Mon, 2023-03-13
2
3Start DateDue Date
4Mon, 2023-03-20Wed, 2023-03-2233%
5Thu, 2023-03-23Thu, 2023-03-230%
6Fri, 2023-03-24Fri, 2023-03-310%
7Fri, 2023-03-17Wed, 2023-03-2250%
LeighSha101
Cell Formulas
RangeFormula
C4:C7C4=IF($A4>$B$1,0,(NETWORKDAYS.INTL($A4,$B$1,1,$D$1)-1)/NETWORKDAYS.INTL($A4,$B4,1,$D$1))
 
Upvote 0
You can use the NETWORKDAYS.INTL function to calculate the number of workdays between two dates, and then divide that by the total number of workdays in the project to get the percentage complete. Here's an example VBA code that does this:
VBA Code:
Sub CalculateProjectProgress()
    Dim startDate As Date
    Dim dueDate As Date
    Dim totalWorkDays As Integer
    Dim completedWorkDays As Integer
    Dim progressPercent As Double
  
    ' Get the start and due dates from your worksheet
    startDate = Range("A1").Value
    dueDate = Range("B1").Value
  
    ' Calculate the total number of workdays in the project
    totalWorkDays = Application.WorksheetFunction.NetworkDays_Intl(startDate, dueDate, 1)
  
    ' Calculate the number of completed workdays
    completedWorkDays = Application.WorksheetFunction.NetworkDays_Intl(startDate, Date, 1)
  
    ' Calculate the progress percentage
    progressPercent = completedWorkDays / totalWorkDays
  
    ' Write the progress percentage to your worksheet
    Range("C1").Value = progressPercent
End Sub
In this example, the start date is in cell A1, the due date is in cell B1, and the progress percentage is written to cell C1. You can adjust the cell references as needed for your worksheet. Note that the NETWORKDAYS.INTL function uses the "1" argument to exclude weekends; you can adjust this argument to exclude other types of holidays if needed.

Yes! Thank you for this!
 
Upvote 0
were you looking for a VBA solution or a formula solution?
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,103
Members
452,302
Latest member
TaMere

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