#NAME

  • Thread starter Thread starter TY
  • Start date Start date
T

TY

I have a UDF that takes an argument:
Function func( Optional s1 As String )

If s1 = "A" Then
func = 10
Else
func = 20
End If

End Function

In a workbook,
A B
1 A =ROUND(func(A1)/10, 2)


The value in B1 is 1.00. I saved the workbook, and re-opened in automatic
calculation mode. As soon as I changed the content of A1 to B, value in B1
was changed to #NAME.

Anyone knows why?

Teresa
 
Terasa

Excel looks for functions were it expects them so it takes
a while to recognise the function in a workbook. You can
always press F9 to calculate the worksheet and this will
force the display.

If you have a lot of UDFs you can save the workbook as an
add-in. You can then install the addin Tools, Add-ins.
scroll down the list till you see your addin tick the
checkbox and click OK.
 
Back
Top