Forum Discussion

bkbkbk01's avatar
bkbkbk01
Copper Contributor
Feb 07, 2023
Solved

Summing the values of 3 columns apart

I have tried to use =SUM(IF(MOD(COLUMN(B3:O3),3),0,B3:O3)) to calculate the value in every 3 columns (B3, E3, H3......) and when I input (COLUMN(B3:O3),3), the value will be the sum of C3, F3, I3.... However when I input 2 (COLUMN(B3:O3),2), the value will be the sum of B3, D3, F3.....

How can I correct the formula so that I can get the value of the sum of B3, E3, H3......

Thank you!

*I also try 4 and I get the values of D3, H3....

  • bkbkbk01 Try it this way.

     

    =SUMPRODUCT((MOD(COLUMN(B3:O3),3)=2)*(B3:O3))

     

    The MOD(----, 3) function returns a value of 2 for columns B,E,H etc.

     

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    bkbkbk01 Try it this way.

     

    =SUMPRODUCT((MOD(COLUMN(B3:O3),3)=2)*(B3:O3))

     

    The MOD(----, 3) function returns a value of 2 for columns B,E,H etc.

     

    • bkbkbk01's avatar
      bkbkbk01
      Copper Contributor
      FINALLY ITS WORK!!!!!
      Thank you so much!!!

Resources