SET.NAME() Cannot Define a Formula

ID: Q69266


The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
  • Microsoft Excel for OS/2 version 2.2 and 3.0


SUMMARY

The DEFINE.NAME() function in Microsoft Excel allows you to define a name as an expression that can be evaluated, such as =3*27 or =COS(x).

If the SET.NAME function is used to define a name as such an expression, the name will be defined as the text of the expression, not the expression itself.


MORE INFORMATION

For example, the statement


   =DEFINE.NAME("func","=36+1") 


defines the name "func" to be the expression:


   =36+1 


If a later cell in the macro contains the statement


   =func 


that cell will evaluate to the value 37.

However, the statement


   =SET.NAME("func","=36+1") 


defines the name "func" to be the text "=36+1", and if a later cell contains the statement "=func", that cell will evaluate to the text value "=36+1", which has a numeric value of zero.


REFERENCES

"Function Reference," version 4.0, pages 100-101, 389-390
"Microsoft Excel Function Reference," version 3.00, pages 48-49, 217-218
"Microsoft Excel for Windows Functions and Macros," versions 2.1x, pages 266-267, 254-255

Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 4.0

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: March 21, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.