Division by 0 error check

Hi guys whats the syntax trap Div/0 errors

=SUM((\$B\$34)/(\$B\$33)) <===== else 0

Thanks
LVL 8
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Older than dirtCommented:
Older than dirtCommented:
Author Commented:
=IFERROR(SUM((\$B\$34)/(\$B\$33)),"0")
=IFERROR(SUM((\$B\$34)/(\$B\$33)),"END OF MONTH")
=IFERROR(SUM((\$B\$34)/(\$B\$33)),0)

These all get the error #NAME?

Why?
Commented:
It looks like each of these have a non-breaking space (&nbsp) at the end so I'm assuming you copied the formula from a webpage and unintentionally included a space.  This space is not the same character as the one produced when hitting the spacebar on your keyboard.  Just delete that extra space after the last parenthesis and your formula should work.
Author Commented:
Hi
I copied and pasted from my spreadsheet directly onto here

=IFERROR(SUM((\$B\$34)/(\$B\$33)),0)
=IFERROR(SUM((\$B\$34)/(\$B\$33)),"0")
=IFERROR(SUM((\$B\$34)/(\$B\$33)),"END OF MONTH")

Both dont work
Analyst ProgrammerCommented:

=if(iserror(SUM((\$B\$34)/(\$B\$33))),0)
Commented:
SUM function isn't required here, lets remove that for a start so you are left with

=\$B\$34/\$B\$33

Now that will only give you a #DIV/0 error if the divisor (B33 here) is zero or blank, so you can check that

=IF(\$B\$33=0,0,\$B\$34/\$B\$33)

IFERROR is only available in Excel 2007 and later - in earlier versions you'll get #NAME? error, my suggestion will work in any version of Excel

regards, barry

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.