Forum Discussion

pillaisg78's avatar
pillaisg78
Copper Contributor
Mar 18, 2024
Solved

Sumifs function

Using sumifs function I am trying to take the sum based on 3 criteria which worked perfectly.

I also have a condition such that out of the 3 criteria in some cases, I may have only 2 criteria to take for the sumifs function and one among the 3 will be kept blank. How can it be achieved?

7 Replies

    • pillaisg78's avatar
      pillaisg78
      Copper Contributor

      HansVogelaar 

       

      I have attached the sample excel file in the link. 

       

      https://1drv.ms/x/s!AvqHVc_GIXwehkO8VheugLQLYMDf?e=hMSa7j 

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        pillaisg78 

        I'd avoid using entire columns in the following:

        =SUM(IF(K1="",1,A2:A100=K1)*IF(K2="",1,B2:B100=K2)*IF(K3="",1,C2:C100=K3)*IF(K4="",1,D2:D100=K4)*E2:E100)

        If you don't have Microsoft 365 or Office 2021, use SUMPRODUCT instead of SUM.

Resources