final String matchRefName = "x";
final ExpressionNode matchRefNode = var( matchRefName );
final ExpressionNode selectorNode = indexNode;
final ExpressionNode defaultNode = err( "#VALUE/REF! because index is out of range in H/VLOOKUP" );
final ArrayDescriptor desc = arrayNode.arrayDescriptor();
final int nArrays = (fun == HLOOKUP) ? desc.numberOfRows() : desc.numberOfColumns();
final ExpressionNodeForSwitchCase[] caseNodes = new ExpressionNodeForSwitchCase[ nArrays ];
for (int iArray = 0; iArray < nArrays; iArray++) {
final ExpressionNode valueArrayNode = getHVLookupSubArray( fun, arrayNode, iArray );
final ExpressionNode lookupNode = fun( INDEX, valueArrayNode, matchRefNode );