I have a spreadsheet where I am calculating change. =F2-E2 . Sometimes the number in E2 is larger than the number in F2 so it is returned as a negative number. How do I not have the formula return any negative numbers? Or houw do I format the cell to not allow any negative numbers. In another formula, where the result of =F2-E2 is used, the resulting negative number won't work...
Hi and welcome to the forum.
One way is to format the numbers as non negatives.
Another is Custom Validation, but i think format cell, is OK.
Hope to helps you.
Regards
Fotis.
I am proud that i am Greek.
Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?
Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Please,mark your thread [SOLVED] if you received your answer.
My Avadar picture, is from Athens Acropolis.
http://www.theacropolismuseum.gr
http://www.visitgreece.gr/
The formula that uses the result of =F2-E2 even recognises the red number as a negative. I've tried all the options for negative numbers in the cell format tool
Then you can do this.
If the result of the formula is in I2(FOR EXAMPLE)
In the other formula that use the result(example =I2+50+20), do this.
=if(i2<0;(-i2+50+20);i2+50+20
Hope to helps you.
Regards
Fotis.
I am proud that i am Greek.
Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?
Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Please,mark your thread [SOLVED] if you received your answer.
My Avadar picture, is from Athens Acropolis.
http://www.theacropolismuseum.gr
http://www.visitgreece.gr/
UsePHP Code:Abs(F2-F1)
You could use an IF formula. Adjust to suit
It would give you the difference between the two cells in both directions=IF(OR(E2="",F2=""),"",IF(E2<F2,F2-E2,IF(E2>F2,E2-F2,"")))
Have fun
Or
=IF(OR(E2="",F2=""),"",IF(E2<F2,F2-E2,E2-F2))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks