Formula based on criteria?
I have no idea if this is possible, it seems like it should be. I want to calculate the difference between two cells, but only when both cells have values, otherwise the cell should remain blank.
So if "January Spending" has a value (Cell B), then it should be subtracted from the "Estimated Monthly Spending" (Cell A) - this calculation would be placed in Cell C. Otherwise, Cell C should remain blank.
Best Answer
-
Try this:
=IF(AND(January46 <> "", Description57 <> ""), January46 - Description57)
Answers
-
@Sam C It can be done, try something like this and see if it works out.... if( January Spending <> "", Estimated Monthly Spending@row-January Spending@row , "" )
-
I'm getting an Incorrect Argument error
"January46" is "January Spending" (sum formula) and "Description" is the "Estimated Money Spending" (average formula)
=IF(January46 <> "", Description@row, January46 - Description@row, "")
I also tried this one but got the same error
=IF(January46 <> "", Description57, January46 - Description57, "")
-
Try this:
=IF(AND(January46 <> "", Description57 <> ""), January46 - Description57)
-
That worked like magic. Thank you!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!