I need help writing a formula.
Logic
if cell b >0, then calculate the Sum Cell b-cell a
Best Answer
-
You would need to add another column to be able to make that calculation.
Answers
-
Please try this:
=IF([ColA]@row > 0, [ColB]@row - [ColA]@row, 0)
If ColA is <=0 then it will return 0
(change "ColA" and "ColB" to your actual column names)
Hope this helps!
-
It gave me back #Circular Reference
this is the formula I made
=IF(May@row > 0, April@row - May@row, 0)
It did not change if I put the row name in brackets [ ]
-
Are you putting the formula into the May or April row?
-
into the May row
-
Which column are you pasting this formula into? Sounds like you're executing this formula in cell b if you're getting a circular reference. This formula won't work in cell/column b because it's the cell being evaluated and written to.
-
Yes I do get a circular reference. What I want to do if possible is if the month = $0 leave it as $0. but if the month is greater than $0 then take that amount and subtract it from the previous months amount to get the difference.
-
You would need to add another column to be able to make that calculation.
-
Ok, thank you!
-
I believe once you reference that other column from the May (cell b) column, your circular reference error will return.
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
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!