# SUMPRODUCT using MOD to sum odd columns

1. ## SUMPRODUCT using MOD to sum odd columns

i am using this formula

=SUMPRODUCT('Monthly View'!D4:AA5000*MOD(COLUMN('Monthly View'!D4:AA4),2))

But it only does the even columns, it will not add up the odd columns as i just get all zeros in the Mod part of the formula or the even columns go to 1 not the odd columns

Any help would be appreciated  Register To Reply

2. ## Re: SUMPRODUCT using MOD to sum odd columns

Rather than show us a formula that doesnt work, upload a sample workbook and show us what you expect - then we wont need to guess   Register To Reply

3. ## Re: SUMPRODUCT using MOD to sum odd columns

Perhaps

=SUMPRODUCT('Monthly View'!D4:AA5000*(MOD(COLUMN('Monthly View'!D4:AA4),2)=0))  Register To Reply

4. ## Re: SUMPRODUCT using MOD to sum odd columns

Alternative to MOD(): ISODD or ISEVEN:
=SUMPRODUCT('Monthly View'!\$D\$4:\$AA\$5000*(ISODD(COLUMN('Monthly View'!\$D\$4:\$AA\$4))))  Register To Reply

5. ## Re: SUMPRODUCT using MOD to sum odd columns

May be this

=SUMPRODUCT('Monthly View'!D4:AA5000*MOD('Monthly View'!D4:AA4,2))  Register To Reply

6. ## Re: SUMPRODUCT using MOD to sum odd columns

@kvsrinivasamurthy:

Note: "SUMPRODUCT using MOD to sum odd columns"
Your formula calculates based on odd VALUES in row 4 cells vs. odd columns, i.e., E,G,...  Register To Reply

7. ## Re: SUMPRODUCT using MOD to sum odd columns

UltimateNeo says

But it only does the even columns, it will not add up the odd columns  Register To Reply

8. ## Re: SUMPRODUCT using MOD to sum odd columns

@kvsrinivasamurthy

If all of the values in the cells are even then your suggestion will not add up any columns!

Note that the thread title and the question state odd columns, not odd values!  Register To Reply

9. ## Re: SUMPRODUCT using MOD to sum odd columns

I tried the formula in a new file and it works =SUMPRODUCT('Monthly View'!D4:AA5000*(MOD(COLUMN('Monthly View'!D4:AA4),2)=0))

thank you  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 