Forum Discussion

Polestar2021's avatar
Polestar2021
Copper Contributor
Mar 22, 2022

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)

  • John-project's avatar
    John-project
    Mar 24, 2022
    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-project's avatar
    John-project
    Silver Contributor
    Polestar2021, 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
    • Polestar2021's avatar
      Polestar2021
      Copper Contributor
      Hi, and thank you for answer!
      I have set the working time for 7.5 hours into days(37.5 in weeks)
      • John-project's avatar
        John-project
        Silver Contributor
        Polestar2021,
        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_Singh's avatar
      Vinod_Singh
      Copper Contributor
      It's very simple just use count formula in resource sheet view under any number field.
      • John-project's avatar
        John-project
        Silver Contributor
        Vinod_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_Singh's avatar
    Vinod_Singh
    Copper Contributor

    Polestar2021 

    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.

Share