I'm attempting to write a formula to calculate the number of positions gained/lost on a cell.

For example:
If A1 has a positive value (example 52.13), then subtract C1 from B1.
If A1 has a negative value (example -36.12), then subtract D1 from B1.

This is the formula I have been playing with:


Any help would be great !


Use the below:


You have not said what you would want in the event of a 0 in A1, to include that you can modify and use the below:

=IF(A1=0,"IF ITS ZERO DO THIS",IF(A1>0,B1-C1,B1-D1))
| improve this answer | |

This should do the work for you:


You have to consider yourself if the $ like in the picture are needed or not since I made this code based on an example that I made myself.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.