Subtraction Formula When One Cell Is Blank
Good afternoon. How do I format my formula as to not allow the subtraction to take place if one of the cells are blank?
=[Starting Board #]@row - [Ending Board # (Top of Stack)]@row
The math is simple unless the Ending Board # cell is blank. I wish to maintain accurate inventory at all times, so if the "Ending Board #" cell is left blank until the last board is used, Smartsheet runs the formula tallying an inaccurate amount (as seen in the screenshot above).
Once the range of material has been used and entered, all my data points are accurate.
What's the formula look like to not run the formula with a blank cell and to still run it with both cells populated?
Best Answer
-
This is a formula entry error. It has nothing to do with any conditional formatting or other formulas. Your formula shows [Ending Board Number (top of stack)]@row when your sheet names that column [Ending Board # (Top of Stack)]@row. Try to copy/paste this into the column then make it a column formula.
=IF(ISBLANK([Ending Board # (Top of Stack)]@row), "", ([Starting Board #]@row - [Ending Board # (Top of Stack)]@row))
Melissa Boehl
Smartsheet Architect | TurningPoint Energy
Answers
-
I would recommend using an if statement. See the attached images for example of the formula in a sheet and the formula used as a column formula.
Melissa Boehl
Smartsheet Architect | TurningPoint Energy
-
@Mellissa Boehl
It doesn't work, I've disabled all conditional formatting and removed all other formulas from the sheet...what am I doing wrong?!?!?!
-
This is a formula entry error. It has nothing to do with any conditional formatting or other formulas. Your formula shows [Ending Board Number (top of stack)]@row when your sheet names that column [Ending Board # (Top of Stack)]@row. Try to copy/paste this into the column then make it a column formula.
=IF(ISBLANK([Ending Board # (Top of Stack)]@row), "", ([Starting Board #]@row - [Ending Board # (Top of Stack)]@row))
Melissa Boehl
Smartsheet Architect | TurningPoint Energy
-
I figured it out. When I manually typed the formula out it didn't work, but after I typed in the prefix (=IF(ISBLANK) and then selected the cells I want the formula to reference, it worked.
Thank you for providing the formula!
-
@JLogan I am glad I was able to help! I should have mentioned to select the cell when inputting the formula. That is always the best way to go. Have a great day!!
Melissa Boehl
Smartsheet Architect | TurningPoint Energy
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!