Forum Discussion
62Mojo
Apr 19, 2023Copper Contributor
Formula returning #value
Hello, I have an error when trying to calculate a value if certain criteria is met. I'm using Excel 2016 (home/student). The formula used for the calculation is =IF(SUM(G31:G32)>0,SUM(G31*0.5...
- Apr 19, 2023I did open the file and G32 is not a number so you need to address that. Here is an alternative:
=IF(SUM(G31:G32)>0,SUM(G31)*0.5+SUM(G32),"")
in this case SUM is used to ignore blank/text. notice I also pulled *0.5 outside the SUM even though that wasn't the problem it could be
NikolinoDE
Apr 19, 2023Gold Contributor
Without opening the file for personal security.
The #VALUE! error in your formula is likely caused by the SUM(G31*0.5) part of the formula. The SUM function takes a range of cells as its argument, but in this case, you are providing it with a single value G31*0.5. This is causing the #VALUE! error.
To fix this error, you can remove the SUM function from this part of the formula and just use G31*0.5 instead.
Here’s the corrected formula:
=IF(SUM(G31:G32)>0,G31*0.5+G32,"")
This formula will check if the sum of cells G31 and G32 is greater than 0 using the SUM(G31:G32)>0 condition.
If this condition is true, it will calculate the value of G31*0.5+G32 and return it as the result. Otherwise, it will return an empty string.
I hope this helps!
- 62MojoApr 19, 2023Copper ContributorThanks for the response and the advice. The issue is now resolved.
Thanks - mtarlerApr 19, 2023Silver ContributorI did open the file and G32 is not a number so you need to address that. Here is an alternative:
=IF(SUM(G31:G32)>0,SUM(G31)*0.5+SUM(G32),"")
in this case SUM is used to ignore blank/text. notice I also pulled *0.5 outside the SUM even though that wasn't the problem it could be- 62MojoApr 19, 2023Copper ContributorThanks for the response and the advice. The issue is now resolved.
Thanks