Forum Discussion

Gryfyy's avatar
Gryfyy
Copper Contributor
Nov 28, 2018
Solved

Need help w/ SUMIF

Hi it's for a class, I need to sum all the even numbers w/ the function SUMIF, to explain better  1-2-3-4-5-6-7-8-9-0 That's a list of random numbers, and i need to sum all EVEN numbers, so the res...
  • Haytham Amairah's avatar
    Nov 29, 2018

    Hi,

     

    I would suggest this formula:

    =SUMPRODUCT((MOD(O1:X1,2)=0)*O1:X1)

     

    But you need each number to separated in a single cell.

     

    If you have another class quiz asking you to sum the odd numbers only, you can simply adjust just the formula as follows:

    =SUMPRODUCT((MOD(O1:X1,2)<>0)*O1:X1)

     

    Hope that helps

Resources