'Excel formulation for addition based on value constarint

Blockquote

This is some random values I've inserted to check formula. Basically I want P/L to be TOTAL EXITED - TOTAL INVESTED However when I've not exited,P/L shows -(TOTAL INVESTED) as I'm using SUM(TOTAL EXITED,-TOTAL INVESTED). Any formula to check P/L only in cases I've TOTAL EXITED greater than 0.

Thanks..!



Solution 1:[1]

Try an IF formula to check if TOTAL EXITED is greater than 0

=IF(TOTAL EXITED>0,TOTAL EXITED - TOTAL INVESTED, 0)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mugron