Forum Discussion

Deleted's avatar
Deleted
May 30, 2018
Solved

EXCEL

Hi,

 

I want to use this code.. =IF(C2="","",SUM($C$2:C2)) but how do I change it so it is the sum of two columns added instead of one?

 

  • If so, I suggest to use this formula instead:

    =IF(AND(C2="",D2=""),"",SUM($C$2:D2))

    Place it in cell E2, and copy it down.

     

    I hope this helps you

    Regards

5 Replies

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Michelle,

     

    If the column you want to include is column B, please make this change to the formula:

    =IF(C2="","",SUM($B$2:C2))

     

    Regards

    • Deleted's avatar
      Deleted

      I would still like to see the Total at E2 and E4. It would only show the total when i enter column C not column D.

      • Haytham Amairah's avatar
        Haytham Amairah
        Silver Contributor

        If so, I suggest to use this formula instead:

        =IF(AND(C2="",D2=""),"",SUM($C$2:D2))

        Place it in cell E2, and copy it down.

         

        I hope this helps you

        Regards

Resources