SUM depending on whether one of the columns has a value
hi - I'm trying to write a formula to calculate the "Over or Under Budget" column to show if we've over or under spent. If the "Reforecast Budget" column is $0 (meaning, there is no reforecast budget), then it should calculate "Original Budget - Projected Total Cost." But, if the Reforecast Budget column has a value, it should calculate "Reforecast Budget - Projected Total Cost." In other words, I want to calculate the over/under column on either the original budget OR the reforecast budget if there is one. Any idea how I can do this?
Best Answer
-
Thanks very much for the answers! I actually saw John's reply first, and played with it a bit. What I finally came up with was actually closer to Aravind's solution. Thanks again for your replies....they are HUGELY helpful. This is what I used:
=IF([Reforecast Budget]@row>0, [Reforecast Budget]@row - [Projected Total Cost]@row, [Original Budget]@row - [Projected Total Cost]@row)
Answers
-
Hi @bruceh
In the Over or Under Budget column, use this formula. =IF([Reforecast Budget]@row = 0, [Original Budget]@row - [Projected Total Cost]@row, [Reforecast Budget]@row - [Projected Total Cost]@row)
Thanks,
Aravind GP| Principal Consultant
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
-
Try something like this:
IF(
OR(
value([Reforecast Budget]@row) = 0,ISBLANK([Reforecast Budget]@row)
),
[Reforecast Budget]@row - [Projected Total Cost]@row,
[Original Budget]@row - [Projected Total Cost]@row
)
-
Thanks very much for the answers! I actually saw John's reply first, and played with it a bit. What I finally came up with was actually closer to Aravind's solution. Thanks again for your replies....they are HUGELY helpful. This is what I used:
=IF([Reforecast Budget]@row>0, [Reforecast Budget]@row - [Projected Total Cost]@row, [Original Budget]@row - [Projected Total Cost]@row)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 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!