Difference between revisions of "Excel to Analytica Mappings/Lookup Functions"

 
Line 6: Line 6:
 
= COLUMNS =
 
= COLUMNS =
 
= GETPIVOTDATA =
 
= GETPIVOTDATA =
= HLOOKUP =
+
= HLOOKUP(lookup_value,table_array,row_index_num'',range_lookup'') =
 +
 
 +
Analytica equivalent (when ''range_lookup'' is omitted or false):
 +
table_array [ ColumnIndex = lookup_value ]
 +
table_array [ ColumnIndex = loopup_value, @RowIndex = row_index_num ] 
 +
 
 +
The Analytica equivalent of HLOOKUP and VLOOKUP is the [[Subscript/Slice Operator|subscript operator, A[I=x] ]].  In Excel, your ''table_array'' is a 2-D array, but when you are doing the equivalent in Analytica, you may be working with a 1-D or a 2-D table array.  With HLOOKUP, Excel conceptualizes your table as running horizontally, from left to right.  Analytica doesn't have a notion of it being left-to-right or top-to-bottom, instead Analyica cares only about what index corresponds to that dimension -- in other words, what index are you searching along.  The first form above is appropriate when your table array is 1-D, or when you want the entire slice of the table.  The second form returns the row of interest.  Note that Excel considers the column index to be row 1, so you may need to subtract one from the ''row_index_num''.
 +
 
 +
When ''range_lookup'' is true (approximate match), the equivalents are:
 +
[[StepInterp]]( ColumnIndex, table_array, lookup_value, ColumnIndex, LeftLookup:true )
 +
[[StepInterp]]( ColumnIndex, table_array[@RowIndex=row_index_num-1], lookup_value, ColumnIndex, LeftLookup:true )
 +
 
 +
This form finds the largest value in ColumnIndex that is less or equal to lookup_value.  The first form is appropriate when your ''table_array'' 1-D, or when you want the entire slice for the value found.  The second form is the more faithful equivalent.
 +
 
 
= HYPERLINK =
 
= HYPERLINK =
 
= INDEX =
 
= INDEX =

Revision as of 22:31, 10 January 2008

INDEX

ADDRESS

AREAS

CHOOSE

COLUMN

COLUMNS

GETPIVOTDATA

HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)

Analytica equivalent (when range_lookup is omitted or false):

table_array [ ColumnIndex = lookup_value ]
table_array [ ColumnIndex = loopup_value, @RowIndex = row_index_num ]   

The Analytica equivalent of HLOOKUP and VLOOKUP is the subscript operator, A[I=x] . In Excel, your table_array is a 2-D array, but when you are doing the equivalent in Analytica, you may be working with a 1-D or a 2-D table array. With HLOOKUP, Excel conceptualizes your table as running horizontally, from left to right. Analytica doesn't have a notion of it being left-to-right or top-to-bottom, instead Analyica cares only about what index corresponds to that dimension -- in other words, what index are you searching along. The first form above is appropriate when your table array is 1-D, or when you want the entire slice of the table. The second form returns the row of interest. Note that Excel considers the column index to be row 1, so you may need to subtract one from the row_index_num.

When range_lookup is true (approximate match), the equivalents are:

StepInterp( ColumnIndex, table_array, lookup_value, ColumnIndex, LeftLookup:true )
StepInterp( ColumnIndex, table_array[@RowIndex=row_index_num-1], lookup_value, ColumnIndex, LeftLookup:true )

This form finds the largest value in ColumnIndex that is less or equal to lookup_value. The first form is appropriate when your table_array 1-D, or when you want the entire slice for the value found. The second form is the more faithful equivalent.

HYPERLINK

INDEX

INDIRECT

LOOKUP

MATCH

OFFSET

ROW

ROWS

RTD

TRANSPOSE

VLOOKUP

Comments


You are not allowed to post comments.