# SUMIF problem - "#incorrect argument set"

Options
edited 12/09/19

Hello,

I am getting the "# INCORRECT ARGUMENT SET" error when using the following formula:

"=SUMIF({Treads Extruded 2019}, MAX({Week no.}) = [Current wk no.]1, {Production Qty})"

I have attached an image of the table I am working with, removed any sensitive information.

I want to add all of the production quantity up for the current week.

• ✭✭✭✭✭✭
edited 04/01/19
Options

What is this range looking at?

And what is in this cell?

[Current wk no.]1

• ✭✭✭✭✭✭
Options

I'll let you respond to Paul, but thought I would throw in this handy error post that helps us Smartsheet Formula Designers know why certain errors are thrown:

• edited 04/02/19
Options

Hi Paul,

The range is looking at the amount of tyre treads extruded on a certain date (e.g. 40 treads of a certain size). The attachment I uploaded in the original post is what this range is.

"[Current wk no.]1" cell formula is "=WEEKNUMBER(TODAY())"

Thanks

• Options

Hi Mike,

I have looked at this before, but still unable to understand what is making this error.

I have tried changing the formula but from what I know, I need those parts in the formula for it to calculate the correct thing (even though it is not).

I find it easier to write down in English first, my outcome of this formula is:

Sum of all the production quantity treads, in the current week.

Thanks

• ✭✭✭✭✭✭
Options

Ok. So you actually have 2 sets of criteria. Size and Date? If that is the case, then you will need to use a SUMIFS instead of a SUMIF. Something like this...

=SUMIFS({Production Qty}, {Week no.}, @cell = WEEKNUMBER(TODAY()), {Tyre Size}, @cell = XXX)

Where the XXX is replaced by the specific size or a cell reference where the specific size is already established.

If it is only the criteria of the week number, I still suggest a SUMIFS (personal preference) along the lines of

=SUMIFS({Production Qty}, {Week no.}, @cell = WEEKNUMBER(TODAY()))

There is also a way to write it to look at the actual date column and get rid of the Week no. column. Simply change your {Week no.} range to look at the date column and the criteria for that range would be

WEEKNUMBER(@cell) = WEEKNUMBER(TODAY())