If statment not working properly? or me?

probably me… i just don’t understand what i’m doing wrong. I trying to use fallowing formula, so any division by zero will be equal to zero, instead of an #DIV/0! error:
=if(B19=0; 0; B23*100/B19)
but instead of getting a 0 or the value, i get a #DIV/0! error if B19 is zero or a #NAME? error if B19 is any other number.
What am i doing wrong here?

Hi

What you describe occurs if B19 is formatted as text. The solution is:

  • Right click B19▸Clear Direct Formatting
  • Type 0 or Delete or any value in B19

Note: you can use =IFERROR(B23*100/B19;0) instead of your formula.

Regards

thanks for the reply! it’s working now…
I don’t really know if this was my issue. I noticed, after reopening the file, that my “formula” was working. It was converted from English to Portuguese: from IF to SE ( =SE(B19=0; 0; B23*100/B19) ). This native language translation of scripting languages is confusing. I keep imagining myself getting a job in France and having to program PHP/Javascript in a French version.
Thanks for the IFERROR sugestion!