Listbox with months followed by hours distribution by weeks/projects

Ninkasi -  
yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   -

Hello,

I would need your help on a subject that I'm stuck on. I would like that in the "Companies" file, if I select a month somewhere (listbox at the top of the sheet or I don't know), then the weeks corresponding to that month from the table below are copied and pasted into the "Hours Allocation" file. I specify that the weeks corresponding to the months are in the "Calendar" tab because they are not the calendar weeks. The data that should be copied into the "hours allocation" file are the columns "Project", "Code", and the hours per week.

Once the data is copied and pasted, I would like that when in week 1 (column D of the "Hours Allocation" file) it shows, for example, 300h, it distributes them in the table to the right "week 1" without exceeding 99h per day (and with the associated code for the line).

Could you help me on this subject as I don't really know how to approach it?

Thank you very much


1 answer

  1. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   Ambassador 1 588
     

    Hello,

    One way to approach this is to learn how to program in VBA.

    0
    1. Ninkasi
       

      I am in progress but my skills are too limited. That's why I'm asking for help.

      0
      1. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > Ninkasi
         

        What have you already accomplished?

        What part are you stuck on?

        0
      2. Ninkasi > yg_be Posted messages 23437 Registration date   Status Contributor Last intervention  
         

        I can copy and paste, but it's the distribution of hours that's the challenge. That is to say, for example, it indicates 400 hours, and I need to distribute them in the adjacent table so that it doesn't exceed 99 hours each day of the week.

        0
      3. yg_be Posted messages 23437 Registration date   Status Contributor Last intervention   1 588 > Ninkasi
         

        Maybe with a loop?
        It's hard to be more specific if you don't show your code.

        0