# Subtracting two cells and getting Invalid Operation error

Options
Overachievers Alumni

Good day,

I am struggling with a formula that keeps giving me an Invalid Operation error.

Am I doing something wrong?

Regards

M

Michelle Basson

Smartsheet Overachiever Alumni | Solution Consultant | Lover of everything Smartsheet

• ✭✭✭✭✭✭
Options

How are the values for the two columns added to the sheet?

I hope that helps!

Be safe and have a fantastic week!

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.

• Overachievers Alumni
Options

Hi Andre,

Apologies for the delayed response.

The values for the 2 columns are generated by formula.

Total Stock Non-Serialized formula

Total Non-SN Stock assigned to warehouse formula

The Total non-Serialized stock on hand is then just a standard deduction (picture as in original post)

What am I doing wrong?

Regards

Michelle

Michelle Basson

Smartsheet Overachiever Alumni | Solution Consultant | Lover of everything Smartsheet

• ✭✭✭✭✭
Options

You're working on text cells, so obviously, you cannot substact.

=IFERROR(VALUE([Total Stock Non-Serialized]@row)-VALUE([Total Non-SN Stock assigned to warehouse),"")

The IFERROR is here in case one of your formula returns an error. But otherwise, you're good to go.

One tip on smartsheet:

If Smartsheet sees a number, it is displayed on the right part of the cell. Otherwise, it's in the middle of the cell. So if there's a "2" in the middle of the cell, Smartsheet sees that as a character, not a number. And thus cannot do any math on it.

So, as a whole, try to always use VALUE([Cell]) when doing maths. just in case :)

• ✭✭✭✭✭✭
Options

No worries!

Let me know if I can help with anything else!

Best,

Andrée

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!