Forum Discussion
Polestar2021
Mar 22, 2022Copper Contributor
Number of assigned resources on tasks
Someone know how to set up a new column to show me the number of assigned resources on tasks?
In column Tekst 1 i have drawn numbers in red just for an example.
And also i would like to have a column that converts hours into days.(column Tekst 2)
- Polestar2021,
You're welcome and thanks for the feedback.
What exactly do you mean by, "place out resources"? And I'm confused about you desire to show a list of resources not assigned to a task yet. At the top of the Resource Usage view you can see a list of unassigned resources but, those resources may or may not be appropriate for assignment to any given task.
With respect to removing decimals in the days column, if you simply want a whole number of days then replace the t.Text1 line with this:
t.Text1 = Format(t.Duration / 60 / ActiveProject.HoursPerDay, "##") & " days"
John
- John-projectSilver ContributorPolestar2021, The custom field for resource count you want can't be done with a custom field formula, VBA is required to parse the Resource Names field to give a count. As far as converting the duration in hours into days, I need to know your definition of a day. The default is 8 hours (working time) but when I apply that to the example task you show (i.e. red 19), the default value doesn't convert. John
- Polestar2021Copper ContributorHi, and thank you for answer!
I have set the working time for 7.5 hours into days(37.5 in weeks)- John-projectSilver ContributorPolestar2021,
Thanks for the information but I still don't get 19 days for 315.44 hours. Is the red 19 just a placeholder and not meant to represent a real value?
John
- Vinod_SinghCopper ContributorIt's very simple just use count formula in resource sheet view under any number field.
- John-projectSilver ContributorVinod_Singh,
But that's not what the user asked for. The user asked for a count of resources assigned to each task.
The custom field formula you propose will work for converting the Duration units into days, but since VBA is required for the first item (i.e. task resource assignment count), it's easier to roll the conversion into the macro then to have a separate custom field.
John
- Vinod_SinghCopper Contributor
Use a custom field Text and enter the formula in it
[Duration]/[Minutes Per Day] & " days"
and you are done.
Calculation is based on 8 hours per day as defined in project calendar, if you say 7.5 hours, it will change automatically.