SUMIFS: IFERROR Function to Ignore Empty Date Cells Not Working

Options
Miranda F.
Miranda F. ✭✭
edited 03/10/23 in Formulas and Functions

Hello,

I need to add an IFERROR function to the below formula, but cannot figure out what to input to make it work. I keep getting #INVALID DATA TYPE, #UNPARSEABLE, and #INCORRECT ARGUMENT SET errors.

The goal is to return the total Amount for a particular Team (Retail in this instance) by week for only rows that have an Award Date entered.

=SUMIFS(Amount:Amount, Team:Team, "Retail", [Award Date]:[Award Date], WEEKNUMBER(@cell) = 8)

This is just one of my many failed attempts:

=SUMIFS(Amount:Amount, Team:Team, "Retail", [Award Date]:[Award Date], WEEKNUMBER(@cell) = 8, IFERROR(WEEKNUMBER(@cell) = 0))


Any help would be greatly appreciated!

Best Answer

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Miranda F.

    You're building this in the right direction! Date functions don't like it when there are blank cells or cells with text in a referenced range. The IFERROR would go around the WEEKNUMBER function directly, try this:

    =SUMIFS(Amount:Amount, Team:Team, "Retail", [Award Date]:[Award Date], IFERROR(WEEKNUMBER(@cell), "") = 8)

    Cheers,

    Genevieve

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer ✓
    Options

    Hi @Miranda F.

    You're building this in the right direction! Date functions don't like it when there are blank cells or cells with text in a referenced range. The IFERROR would go around the WEEKNUMBER function directly, try this:

    =SUMIFS(Amount:Amount, Team:Team, "Retail", [Award Date]:[Award Date], IFERROR(WEEKNUMBER(@cell), "") = 8)

    Cheers,

    Genevieve

  • Miranda F.
    Options

    And just like magic, it works! Thank you, thank you!!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!