Forum Discussion
IF function with calculation based on other cell
amangar I assume if it isn't within 15 it should be 0
I don't know why your IF statements aren't working or why you don't have IFS, but here is a formula without a single IF in it:
=MAX(5-2*INT((AVEDEV(D7,C7)*2)/5),0)
EDIT: I just saw your attachment and see
a) your formulas are using <= not "within"
b) yes you wanted outside 15 to be 0
c) the if statement you typed worked fine for me (I re-typed the "=" to make excel recognize it)
Here is the changed formula to account for "within or equal to"
=MIN(MAX(2*INT((20-AVEDEV(D5,C5)*2)/5)-1,0),5)
- mathetesJun 09, 2020Silver Contributor
That is quite a formula!!
All because @amangar couldn't make IF work (and that caused by an invisible space in front of the IF function that really had nothing else wrong with it)
...necessity being the mother of invention, you came up with a doozy. Well done! Yet another illustration of how Excel gives many ways to get from point A to point B.