SUMPRODUCT(--(MOD(OFFSET(C1,COUNTA(Dynamic Range),2)=1)) - Too few arguments - Why?

Poker Joe

New Member
Joined
Feb 12, 2015
Messages
30
Office Version
  1. 2019
Platform
  1. Windows
I need to enter a formula that will automatically update as I enter data daily. I'm attempting to use a dynamic range within the formula.

The formula in "I2" will find how many odd numbers are in the data (rows of data in C:G) for the last 5 days but I have to adjust the range every time I enter new data.

This is my attempt for a dynamic range within the formula in I2, =SUMPRODUCT(--(MOD(OFFSET(C1,COUNTA(C2:G1500,0,-5,1),2)=1))

Microsoft gives an error message that I've entered too few arguments. Once I select "OK" on the error message, the last "1" in the formula bar is highlighted.

I'm lost. Thanks in advance to anyone that can assist.

Book1.xlsx
ABCDEFGHIJ
1IDDateTeam1Team2Team3Team 4Team5OddEven
214492716338Last 5 Days=SUMPRODUCT(--(MOD(C17:G21,2)=1))=25-I2
324492827449
434492938573Last 5 Days
544493049684Dynamic Range=SUMPRODUCT(--(MOD(OFFSET(C1,COUNTA(C2:G1500,0,-5,1),2)=1))
6544931510195You've entered too few arguments for this function
764493238574After selecting OK on the Microsoft Error message, it highlights the last
874493349631"1" in the formula.
984493473496
10944935845101
11104493695385
121144937106496
13124493884968
14134493938573
15144494049634
16154494173495
171644942845106
18174494327449
19184494438573
20194494549684
212044946510195
22
23
Sheet1
Cell Formulas
RangeFormula
I2I2=SUMPRODUCT(--(MOD(C17:G21,2)=1))
J2J2=25-I2
 
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top