Forum Discussion

tttt_tt's avatar
tttt_tt
Copper Contributor
May 05, 2022
Solved

sum

I have a list of names in Droplist and I have a separate table in the same sheet to calculate the working hours. I want when this finds for example the name George to sum up the total hours that have been registered for him each time. I imagine that they are done with if. Can you help me with this function?

  • tttt_tt 

    =SUMIF($G$4:$G$27,C4,$H$4:$H$27)

    Maybe with this formula if the dropdown is in cell C4 and the separate table in range $G$4:$H$27.

     

3 Replies

  • tttt_tt 

    =SUMIF($G$4:$G$27,C4,$H$4:$H$27)

    Maybe with this formula if the dropdown is in cell C4 and the separate table in range $G$4:$H$27.

     

    • tttt_tt's avatar
      tttt_tt
      Copper Contributor
      CAN I ADD SECOND COOLUMN AFTER C4? FOR EXAMLE ($J$4:$J$27) CAN I ADD THIS, TO SUM THE TOTAL OF TWO COLUMS?
      IF YES, HOW I CAN DO THIS?
      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        tttt_tt 

        =SUMPRODUCT(($G$4:$G$27=C4)*(MOD(COLUMN(H:J),2)=0)*$H$4:$J$27)

        Maybe with this formula if you want to sum only the values in ranges $H$4:$H$27 and $J$4:$J$27 (columns H and J excluding column I).