# Invalid Data Type, could it be the Month (@cell)

Options
✭✭✭✭

Hello,

In the sheet summary field (property is Text/Number) I am trying to sum invoice amounts (Column is called Amount) that are submitted each month (Column is called Invoice Date and is a Date column) using this formula but getting Invalid Data Type:

=SUMIF([Invoice Date]1:[Invoice Date]22, MONTH(@cell) = 4, [Amount]1:[Amount]22)

4 = April

What is also strange is the formula will somehow change to this:

=SUMIF([Invoice Date]1:[Invoice Date]22, MONTH(@cell) = 4, Amount1:Amount22)

Any help is much appreciated.

• ✭✭✭✭✭
Options

@lisa.bolger27646 When using the Month() function it requires a date like Month([Invoice Date]1). Trying using it with the example to see if it works, then you can use whichever column has the April date and should be good.

https://help.smartsheet.com/function/month

Regards - JC

• ✭✭✭✭
Options

Thank you Jeremy C! I'm getting closer. Not exactly sure how to work Invoice Date in with Month(@cell)

I understand that the month function sometimes gives errors. Would IFERROR help?

This formula below works!

=SUMIF(Invoice Date1:Invoice Date11, MONTH(@cell) = 2, Amount1:Amount11)

I would like the formula to look at the entire column and tried this, but it doesn't work:

=SUMIF(Invoice Date:Invoice Date, MONTH(@cell) = 2, Amount:Amount)

Any ideas? I know it's not too complicated but I'm stuck, appreciate your help!

• ✭✭✭✭✭✭
Options

Try something like this.

```=SUMIF([Invoice Date]:[Invoice Date], IFERROR(MONTH(@cell),0) = 2, Amount:Amount)
```

Did that work?

I hope that helps!

Be safe and have a fantastic weekend!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!