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
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!