View Single Post
 
Old 04-08-2015, 05:55 PM
BudVitoff BudVitoff is offline Windows 7 64bit Office 2007
Advanced Beginner
 
Join Date: Sep 2011
Posts: 52
BudVitoff is on a distinguished road
Default

The basic formula that you want to use is =if (x,t,f) which reads "if the value of x is true, then this cell (that contains this formula) will be set to the value of t, otherwise it will be set to the value of f."

So to use your cell names of E5 and AI9, your result cell could read =if((E5-AI9)>9494,0,(E5-AI9)). This is the most concise and self-explanatory form.

Some people might be bothered by the fact that the subtraction may be performed twice, so they'll take two steps: first to subtract and put the difference in a temporary cell, then to have the result cell look at the temporary cell. I wouldn't bother. (I hesitate to mention that the result cell could actually be used as the temporary cell, but Excel will spit up and give you a warning about doing stuff like that. Don't do it.)
Reply With Quote