Forum Discussion
JoeJP
Oct 06, 2022Copper Contributor
What is wrong with this equation. I get Error code 504.
W231 =Datevalue('11/1/22) W218=Datevalue('10/1/21) W219=Datevalue('11/1/21) W220=Datevalue('2/1/21) Err:504 ◄'=IF((W231-W218)>=30=1,66.42,IF(W231-W219)>=60=1,132.84,IF(W231-W220)>=9...
HansVogelaar
Oct 06, 2022MVP
Does this do what you want?
=IF(W231-W218>=90, 1199.26, IF(W231-W219>=60, 1132.84, IF(W231-W220>=30, 166.42, 0)))
or
=IFS(W231-W218>=90, 1199.26, W231-W219>=60, 1132.84, W231-W220>=30, 166.42, TRUE, 0)
Note that the order of the conditions had to be reversed.
JoeJP
Oct 06, 2022Copper Contributor
Thank you Hans. Your suggestion works, why I don't know. If each IF statement is entered by itself,
the equations work but not when ganged together.