Forum Discussion

CloversBooks1993's avatar
CloversBooks1993
Copper Contributor
Aug 04, 2022

Auto Divide Cell Value to Specified Cells in a Column

Hi. Newbie here, hope you can help me. Im working on a spreadsheet and I have to autodivide a certain number of cases to the number of headcount we have in a day across a column in a range of cells and at the same time if an employee had a remark on the remarks column that they be automatically skipped. Im not sure if I relayed it clearly but I dropped a pic of how I wanted it to be like. Thank you so much in advance! 

 

  • CloversBooks1993 

    In E5:

    =IF(D5="Absent",0,QUOTIENT($A$1,$A$2-COUNTIF($D$5:$D$9,"Absent"))+(COUNTIF(D$5:D5,"<>Absent")<=MOD($A$1,$A$2-COUNTIF($D$5:$D$9,"Absent"))))

    Fill down to E9.

    • CloversBooks1993's avatar
      CloversBooks1993
      Copper Contributor

      HansVogelaar 

       

      This is so helpful! How about if I have other values other than "Absent"? How can I add them? I appreciate you so much! 

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        CloversBooks1993 

        Let's say you also want to exclude Meeting.

        Change COUNTIF($D$5:$D$9,"Absent") to (COUNTIF($D$5:$D$9,"Absent")+COUNTIF($D$5:$D$9,"Meeting"))

        and COUNTIF($D$5:$D$9,"<>Absent") to

        COUNTIFS($D$5:$D$9,"<>Absent",$D$5:$D$9,"<>Meeting")

        You can add other options the same way.

Resources