#1   Report Post  
John Wirt
 
Posts: n/a
Default Why #Name??

Here is a simple user-defined function. It is the basic test for statistical
significance.

When I insert this code in a module in PERSONAL.XLS and use it in a cell in
an open workbook, I get the error message: #NAME?

If I insert this function in a module of the open workbook, it works.

Why doesn't this UDF work when inserted in PERSONAL.XLS?

Thank you.

John Wirt
---

Public Function SigTest(cell1, cell2, cell3, cell4)
Dim testval As Long

testval = (cell1 - cell2) * (cell1 - cell2)
testval = testval / (cell3 * cell3 + cell4 * cell4)
If testval 3.841447 Then
SigTest = "*"
Else
SigTest = ""
End If

End Function


  #2   Report Post  
John Wirt
 
Posts: n/a
Default

Not sure why, but I posted this message again (first posted 10/10/05)
because it was not in excel.workbook.functions when I opened in it
OExpress.. Cannot figure out why. I've had this problem before. I post
articles to MS news groups but they don't show up in the group. But they are
in my Sent box. Add I fill newsgroup addresses in msnews.microsoft.com
account using the search function. If anybody has had this problem, please
post me a reply here. I can access the group through Google. John Wirt


"John Wirt" wrote in message
...
Here is a simple user-defined function. It is the basic test for

statistical
significance.

When I insert this code in a module in PERSONAL.XLS and use it in a cell

in
an open workbook, I get the error message: #NAME?

If I insert this function in a module of the open workbook, it works.

Why doesn't this UDF work when inserted in PERSONAL.XLS?

Thank you.

John Wirt
---

Public Function SigTest(cell1, cell2, cell3, cell4)
Dim testval As Long

testval = (cell1 - cell2) * (cell1 - cell2)
testval = testval / (cell3 * cell3 + cell4 * cell4)
If testval 3.841447 Then
SigTest = "*"
Else
SigTest = ""
End If

End Function




  #3   Report Post  
John Wirt
 
Posts: n/a
Default

Forget this. I found the original post of this question and the reply.
John

"John Wirt" wrote in message
...
Here is a simple user-defined function. It is the basic test for

statistical
significance.

When I insert this code in a module in PERSONAL.XLS and use it in a cell

in
an open workbook, I get the error message: #NAME?

If I insert this function in a module of the open workbook, it works.

Why doesn't this UDF work when inserted in PERSONAL.XLS?

Thank you.

John Wirt
---

Public Function SigTest(cell1, cell2, cell3, cell4)
Dim testval As Long

testval = (cell1 - cell2) * (cell1 - cell2)
testval = testval / (cell3 * cell3 + cell4 * cell4)
If testval 3.841447 Then
SigTest = "*"
Else
SigTest = ""
End If

End Function




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"