SOLVED

sum

%3CLINGO-SUB%20id%3D%22lingo-sub-3320885%22%20slang%3D%22en-US%22%3Esum%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3320885%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20list%20of%20names%20in%20Droplist%20and%20I%20have%20a%20separate%20table%20in%20the%20same%20sheet%20to%20calculate%20the%20working%20hours.%20I%20want%20when%20this%20finds%20for%20example%20the%20name%20George%20to%20sum%20up%20the%20total%20hours%20that%20have%20been%20registered%20for%20him%20each%20time.%20I%20imagine%20that%20they%20are%20done%20with%20if.%20Can%20you%20help%20me%20with%20this%20function%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3320885%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3321365%22%20slang%3D%22en-US%22%3ERe%3A%20sum%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3321365%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1381645%22%20target%3D%22_blank%22%3E%40tttt_tt%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DSUMIF(%24G%244%3A%24G%2427%2CC4%2C%24H%244%3A%24H%2427)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMaybe%20with%20this%20formula%20if%20the%20dropdown%20is%20in%20cell%20C4%20and%20the%20separate%20table%20in%20range%20%24G%244%3A%24H%2427.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3321591%22%20slang%3D%22en-US%22%3ERe%3A%20sum%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3321591%22%20slang%3D%22en-US%22%3ECAN%20I%20ADD%20SECOND%20COOLUMN%20AFTER%20C4%3F%20FOR%20EXAMLE%20(%24J%244%3A%24J%2427)%20CAN%20I%20ADD%20THIS%2C%20TO%20SUM%20THE%20TOTAL%20OF%20TWO%20COLUMS%3F%3CBR%20%2F%3EIF%20YES%2C%20HOW%20I%20CAN%20DO%20THIS%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3321687%22%20slang%3D%22en-US%22%3ERe%3A%20sum%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3321687%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1381645%22%20target%3D%22_blank%22%3E%40tttt_tt%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DSUMPRODUCT((%24G%244%3A%24G%2427%3DC4)*(MOD(COLUMN(H%3AJ)%2C2)%3D0)*%24H%244%3A%24J%2427)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMaybe%20with%20this%20formula%20if%20you%20want%20to%20sum%20only%20the%20values%20in%20ranges%26nbsp%3B%3CSPAN%3E%24H%244%3A%24H%2427%20and%26nbsp%3B%24J%244%3A%24J%2427%20(columns%20H%20and%20J%20excluding%20column%20I).%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

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?

3 Replies
best response confirmed by tttt_tt (Occasional Contributor)
Solution

@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.

 

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?

@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).