• Resolved mehmetoskan

    (@mehmetoskan)


    Hello,
    I want to calculate the win percentage. A1 is win and B1 is lose. First I calculate the games played on C1 as =A1+B1. When a player had never played a game on that event games played is zero. Then I use ?f like =if(C1>0,number_format(A1/C1*100,1),0) or =if(C1>0,A1/C1*100,0) it returns (!ERROR! illegal character ‘&’). When I only enter =A1/C1*100 it returns (!ERROR! division by zero).

    I want to display points tables with this easy and beautiful plugin on my tennis club. Please Help me. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The problem here might be that the division is still performed. You’ll probably have to use the trick from https://www.ads-software.com/support/topic/error-division-by-zero-2/#post-11013573
    In addition, you should then wrap the NUMBER_FORMAT() function around that IF(), not inside. This might also lead to problems.

    Regards,
    Tobias

    Thread Starter mehmetoskan

    (@mehmetoskan)

    Thank you for reply. But I have read that topic before asking for support. I try if() with number_format and without number_format. They both return same error. (!ERROR! illegal character ‘&’) When I try without if it returns !ERROR! division by zero.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you need an extra IF() inside the division:

    =NUMBER_FORMAT( IF( C1>0, 100*A1/( IF( C1>0, C1, 1 ) ), 0 ), 1 )
    

    Regards,
    Tobias

    Thread Starter mehmetoskan

    (@mehmetoskan)

    Sorry but it returns the same error: (!ERROR! illegal character ‘&’)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    then you really have a & character there somewhere in your cells (in A1, B1, or C1, I guess).
    Make sure that you are referencing the correct cells maybe?

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘!ERROR! division by zero and !ERROR! illegal character ‘&’’ is closed to new replies.