SOLVED

Can't invoke a UDF from an excel sheet

Copper Contributor

I have office 365 and i can't invoke ANY user defined function.
For example - I have tried simple adding two numbers function.

Function add2numbers(x As Integer, y As Integer) As Integer  
add2numbers = x + y  
End Function 

after writing the above code, when i try calling that function in an excel sheet by `=add2numbers(3, 4)`
I get a pop up message saying: There's a problem with this formula.
I have reinstalled complete office 365 but problem still persists. 

Any leads? Thank you for your time.

2 Replies
best response confirmed by naveenkumarp91 (Copper Contributor)
Solution

@naveenkumarp91 

Do you use comma as decimal separator? If so, use semicolons in the formula:

 

=add2numbers(3; 4)

@Hans Vogelaar 

Yes, Using SEMICOLON as a list separator RESOLVED the problem.
Due to my current regional settings, i was unaware that i was having Semicolon as List separator and i was constantly trying to invoke with comma.
Now, I have changed my regional settings, which has comma as a list separator.
I can now use COMMA to call a UDF.
Thank you very much for your time and assistance.

1 best response

Accepted Solutions
best response confirmed by naveenkumarp91 (Copper Contributor)
Solution

@naveenkumarp91 

Do you use comma as decimal separator? If so, use semicolons in the formula:

 

=add2numbers(3; 4)

View solution in original post