Forum Discussion
amangar
Jun 09, 2020Copper Contributor
IF function with calculation based on other cell
I am looking to use the IF function that produces a 1, 3, or 5 in E5 based on C1 based on the following criteria: if D7 is within 5 points of C7, then E7 should be 5 (i.e., 5 points greater than...
mathetes
Jun 09, 2020Gold Contributor
Let me explain the answer briefly.
First, the syntax of IFS is as follows =IFS(condition1,result1,condition2,result2,condition3,result3,....etc)
It stops once it reaches a condition that is satisfied.
I initially wrote it without the ABS, which gets the absolute difference between the two numbers, no matter which is the larger. Whether C7 is larger or smaller than D7 by those prescribed conditional limits, this will produce your desired results.