Excel to Analytica Mappings/Information Functions
In Excel, this is used to access various internal aspects of a cell. There is no exact equivalent, but several analogues in Analytica do apply.
Many of the info_type settings involve accessing aspects of the number format for the cell. In Analytica, you can examine the number format of a variable «X» using:
- NumberFormat Of X
When this is null, it means that the default number format is being used (e.g., Suffix 4).
Other «info_type»s are loosely analogous to other attributes of Analytica objects, such as NodeSize, etc.
This is very specific to Excel. There is no Analytica equivalent.
Analytica equivalents for INFO("directory"):
Analytica equivalent for INFO("system"):
(Excel would return "pcdos". Analytica's system variable will be "Windows")
Analytica equivalent for INFO("release"):
(Returns an integer such as 40601 to indicate release 4.6.1).
- Mod(x, 2)==0
- (x==0 or x==1)
- Mod(x, 2)==1
Note: This tests whether «x» is an Analytica reference.
- If IsNumber(val) Then val Else 0
NA is used in Excel to mark cells as empty, so you don't unintentionally include empty cells in your calculations without knowing it. The same can be accomplished by using blank cells in Analytica edit tables.
By default, Analytica will initialize edit table cells to 0. To change this behavior to use blank cells instead, press F12 to enter the typescript window and type:
Note the colon with nothing after it (i.e., blank is after it). This will cause edit table cells to appear as blank, and a warning will occur if you attempt to use a table containing blank cells in a computation. From an edit table with blank as a default cell value, you can clear a cell, returning it to the blank state, just by erasing its contents.
This is not an exact equivalent since the return values are somewhat different. When «x» is numberic, Excel returns 1, TypeOf(x) is "Number". For text, Excel returns 2, Analytica's TypeOf(x) returns "Text". Also, Analytica applies this cell-by-cell, array abstracting across an array. In Excel, when TYPE is applied to an array, it returns 64. To test for whether a value is an array (and not just a single value) use: