Question

My code works fine in my test sheet, but when i enter it in my active sheet i get a value error...any suggestions? I really don't know what i'm doing wrong, literally pulling my hair out. Any help as to why im getting this error will be greatly appreciated.

the below code works perfectly in my test sheet and returns all values correctly, somehow when I enter it in the sheet that matters, boom value error.

=IF(J5="YES",SUM((E10:I610>11538)*(E10:I610<=34760)*(A10:A610="No")*ROUND(E10:I610*0.056,0))+SUM((E10:I610>34760)*ROUND(34760*0.056,0)),0) 
Was it helpful?

Solution

I agree with Doug - assuming you don't have errors in the referenced ranges it looks like #VALUE! error would only be caused by trying to apply a ROUND function to a text value - this version should avoid that error

=IF(J5="YES",SUM(IF(E10:I610>11538,IF(E10:I610<=34760,IF(A10:A610="No",ROUND(E10:I610*0.056,0)),IF(ISNUMBER(E10:I610),ROUND(34760*0.056,0))))),0)

confirmed with CTRL+SHIFT+ENTER

.....but check the result because the fix might effect the expected result

Note: if E10:I610 is > 34760 then the sum includes 34760*0.056 rounded (i.e. 1947) regardless of the column A value (as per your formula). Is that the intent?

Re your comment - this revised version should do what you want

=IF(J5="YES",SUM(IF(E10:I610>11538,IF(A10:A610="No",IF(ISNUMBER(E10:I610),ROUND(IF(E10:I610>34760,34760,E10:I610)*0.056,0))))),0)

OTHER TIPS

It is an array formula, so use Ctrl-Shift-Enter rather than Enter to complete it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top