Home > Software engineering >  How to Sum Horizontal Values Depending on Multiple Conditions
How to Sum Horizontal Values Depending on Multiple Conditions

Time:12-18

enter image description here

I want to sum "Main" and "Second" under TOTAL if the "CHECK" is "YES". This continues until 100 so I have to use range formulas. Is there a way?

CodePudding user response:

For Main try-

=SUM(TOCOL(--(C2:K2="Main")*--(E2:K2="Check")*(E3:K3="Yes")*(C3:K3),3))

For Second try-

=SUM(TOCOL(--(C2:K2="Second")*--(D2:K2="Check")*(D3:K3="Yes")*(C3:K3),3))

enter image description here

  • Related