Forum Discussion
EllieDudman
Nov 14, 2023Copper Contributor
IF Function
Please could someone help me with the correct IF Function I need to return the following in the % variance column:
If 2022 is blank or 0 return 100%
If 2023 and 2022 are blank or 0 return 0%
Otherwise return the result of the formula - variance column divided by 2022
2023 | 2022 | Variance | % Variance | |
A | 55 | 0 | 55 | 100% |
B | 0 | 85 | (85) | -100% |
C | 0 | 0 | 0 | 0% |
Thank you
- Detlef_LewinSilver Contributor
The formula is:
=[@Variance]/[@2022]
Everything else is inventing new mathematics.
Or you could trap the error:
=IFERROR([@Variance]/[@2022],"not computable")