Forum Discussion
What is wrong with this equation. I get Error code 504.
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.
Curious: Is Excel now returning error codes like Error 504 now instead of #VALUE, for exampe ?!
Not according to my google search. But then again, my google search skills are poor.
OTOH, I believe that other spreadsheet apps (Google Sheets, for example?) do return error codes.
- HansVogelaarOct 06, 2022MVP
Excel doesn't return error numbers in formulas as far as I know.
Error 504 appears to be a possible error message when Excel crashes, indicating a memory leak...
- JoeUser2004Oct 06, 2022Bronze Contributor
HansVogelaar wrote: ``Error 504 appears to be a possible error message when Excel crashes, indicating a memory leak``
Thanks. I ask because in another context, a user claims that Excel returns "Err:502" where I would expect #NUM among a series of (improper) XIRR formulas. Clearly, Excel is not "crashing" (terminating unexpectedly) in those instances.
One non-MSFT website claims that Excel returns Error xxx as a "logic error" (distinct from a crash) due to a memory "fault" (computer error) in handling data. But I would be surprised if Excel does not in fact abort when that happens.
Oh well, it's good to know that Excel has not changed the way that it reports user errors. Thanks.