Question Locked

User Defined Function in Excel

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have attempted to put in a UDF in three different machines and get the same result. I get an error when I attempt to reference the UDF. I put in
Function AddUp(x,y)
AddUp = x + y
End Function

When I pick a cell in the worksheet and put in
=AddUp(5,2) I get an error #Name? I have unchecked the Require Variable Definition box so why won't it run?

2 replies

by Member 25348569

I did paste in your UDF and it worked fine as I thought it would. The obvious question is did you save it into an xla add-in? Can you see the function name if you Shift-F3 and open category "User defined"?.

Neil :)

This discussion is closed to new replies.