Formula counting working days

B

bart c

Can i write a formula that shows the number of working days, counting from
the project start date (not each tasks start date!) until each task's finish
date? (So: take the finish date of each task, subtract the start date of the
project (not of the task!) and count how many working days there are in that
range?)
(I don't wont to use the calendar option that counts working days in the
tiers, but the tiers have to show the classical units)
Any suggestions?
 
J

JulieS

Hello bart c,

Assuming that your project calendar is some variation on Standard
(M - F only) - first create a calendar with all seven days as
working days. In the formula below I've called the calendar 7Day.

Then, customize a spare duration field with the following formula:

ProjDateDiff([Project Start],[Finish],"7Day")

This will calculate the difference between a task's finish date
and the Project start date counting every day as a working day.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project
 
J

John

bart c said:
Can i write a formula that shows the number of working days, counting from
the project start date (not each tasks start date!) until each task's finish
date? (So: take the finish date of each task, subtract the start date of the
project (not of the task!) and count how many working days there are in that
range?)
(I don't wont to use the calendar option that counts working days in the
tiers, but the tiers have to show the classical units)
Any suggestions?

Bart,
Sure, customize one of the spare text fields (e.g. Text1), with the
following formula:
ProjDateDiff([Project Start],[Finish])/480

You may or may not want to extend the formula to include summary lines.
If you do, make sure you check that option in the Customize Fields
window.

Hope this helps.

John
Project MVP
 
B

bart c

One of my own colleagues found a solution. I'll report it here, it may useful
for other people:
We used the formula: ProjDateDiff([Project Start];[Finish];[Project
Calendar])†in a custom duration field.
 
B

bart c

Hello Julie,

I think that your formule gives me the number of calendar days instead of
working days. I wrote another comment already. Maybe you can read it and give
feed-back.

Thanks anyway for reacting so quickly.
Grts, Bart C

JulieS said:
Hello bart c,

Assuming that your project calendar is some variation on Standard
(M - F only) - first create a calendar with all seven days as
working days. In the formula below I've called the calendar 7Day.

Then, customize a spare duration field with the following formula:

ProjDateDiff([Project Start],[Finish],"7Day")

This will calculate the difference between a task's finish date
and the Project start date counting every day as a working day.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project

Can i write a formula that shows the number of working days, counting from
the project start date (not each tasks start date!) until each task's finish
date? (So: take the finish date of each task, subtract the start date of the
project (not of the task!) and count how many working days there are in that
range?)
(I don't wont to use the calendar option that counts working days in the
tiers, but the tiers have to show the classical units)
Any suggestions?
.
 
B

bart c

Hello John,

Can you explain this dividing by 480?

As you can read, I've already found one solution, but yours can work too.

Grts,
Bart C

John said:
bart c said:
Can i write a formula that shows the number of working days, counting from
the project start date (not each tasks start date!) until each task's finish
date? (So: take the finish date of each task, subtract the start date of the
project (not of the task!) and count how many working days there are in that
range?)
(I don't wont to use the calendar option that counts working days in the
tiers, but the tiers have to show the classical units)
Any suggestions?

Bart,
Sure, customize one of the spare text fields (e.g. Text1), with the
following formula:
ProjDateDiff([Project Start],[Finish])/480

You may or may not want to extend the formula to include summary lines.
If you do, make sure you check that option in the Customize Fields
window.

Hope this helps.

John
Project MVP
.
 
J

Jan De Messemaeker

Hi,

If you use a difference between two dates Project calculates it in minutes.
This is no worry if you use a custom duration field as you do (the best
solution IMHO) because that is shown in whatever is your duration unit.
But, if you show the value ina number oe a text column, to make it read
days, you have to divide by the minutes per day.
John supposes that is 480, but there is no need to suppose since you can use
the value
[Minutes per Day]

Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
bart c said:
Hello John,

Can you explain this dividing by 480?

As you can read, I've already found one solution, but yours can work too.

Grts,
Bart C

John said:
bart c said:
Can i write a formula that shows the number of working days, counting
from
the project start date (not each tasks start date!) until each task's
finish
date? (So: take the finish date of each task, subtract the start date
of the
project (not of the task!) and count how many working days there are in
that
range?)
(I don't wont to use the calendar option that counts working days in
the
tiers, but the tiers have to show the classical units)
Any suggestions?

Bart,
Sure, customize one of the spare text fields (e.g. Text1), with the
following formula:
ProjDateDiff([Project Start],[Finish])/480

You may or may not want to extend the formula to include summary lines.
If you do, make sure you check that option in the Customize Fields
window.

Hope this helps.

John
Project MVP
.
 
J

JulieS

Hi Bart,

Yes, sorry. I misread your initial post and thought you were
looking for calendar, not working days.

Your formula should work fine, as should mine, just omitting the
final calendar argument.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project

Hello Julie,

I think that your formule gives me the number of calendar days instead of
working days. I wrote another comment already. Maybe you can read it and give
feed-back.

Thanks anyway for reacting so quickly.
Grts, Bart C

JulieS said:
Hello bart c,

Assuming that your project calendar is some variation on Standard
(M - F only) - first create a calendar with all seven days as
working days. In the formula below I've called the calendar 7Day.

Then, customize a spare duration field with the following formula:

ProjDateDiff([Project Start],[Finish],"7Day")

This will calculate the difference between a task's finish date
and the Project start date counting every day as a working day.

I hope this helps. Let us know how you get along.

Julie
Project MVP

Visit http://project.mvps.org/ for the FAQs and additional
information about Microsoft Project

Can i write a formula that shows the number of working days, counting from
the project start date (not each tasks start date!) until each task's finish
date? (So: take the finish date of each task, subtract the start date of the
project (not of the task!) and count how many working days there are in that
range?)
(I don't wont to use the calendar option that counts working days in the
tiers, but the tiers have to show the classical units)
Any suggestions?
.
 
J

Jim Aksel

I am with Jan ... [minutes per day] will automatically correct your formula
if the work hours change. For example, some companies may adopt a 10 hour
day, 4 days per week.
--
If this post was helpful, please consider rating it.

Jim Aksel, MVP

Check out my blog for more information:
http://www.msprojectblog.com



Jan De Messemaeker said:
Hi,

If you use a difference between two dates Project calculates it in minutes.
This is no worry if you use a custom duration field as you do (the best
solution IMHO) because that is shown in whatever is your duration unit.
But, if you show the value ina number oe a text column, to make it read
days, you have to divide by the minutes per day.
John supposes that is 480, but there is no need to suppose since you can use
the value
[Minutes per Day]

Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
bart c said:
Hello John,

Can you explain this dividing by 480?

As you can read, I've already found one solution, but yours can work too.

Grts,
Bart C

John said:
Can i write a formula that shows the number of working days, counting
from
the project start date (not each tasks start date!) until each task's
finish
date? (So: take the finish date of each task, subtract the start date
of the
project (not of the task!) and count how many working days there are in
that
range?)
(I don't wont to use the calendar option that counts working days in
the
tiers, but the tiers have to show the classical units)
Any suggestions?

Bart,
Sure, customize one of the spare text fields (e.g. Text1), with the
following formula:
ProjDateDiff([Project Start],[Finish])/480

You may or may not want to extend the formula to include summary lines.
If you do, make sure you check that option in the Customize Fields
window.

Hope this helps.

John
Project MVP
.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top