Forum Discussion

Templar70's avatar
Templar70
Copper Contributor
Jun 10, 2020
Solved

Sum of Range based on numbers in a different row

Hi, I would appreciate any help I can receive on this spreadsheet, which is being used for tracking employee absence.  I am trying to sum the total of a range.(the sum of the hours taken in the month...
  • Detlef_Lewin's avatar
    Jun 10, 2020

    Templar70 

    =SUM((B5:AF5="X")*(B$4:AF$4),B5:AF5)

    or for older versions of Excel:

    =SUMPRODUCT((B5:AF5="X")*(B$4:AF$4),B5:AF5)

Resources