Difference between revisions of "XL3GridArrayLookup"

(Created page with "Returns the result of an MDX query as an array. This is a [https://support.office.com/en-gb/article/Guidelines-and-examples-of-array-formulas-7d94a64e-3ff3-4686-9372-ecfd5caa5...")
 
(Example)
Line 31: Line 31:
 
==Example==
 
==Example==
  
 +
Here we have our MDX statement in cell A1. We select the range we want to output the results to, and type
 +
 +
{{code|=XL3GridArrayLookup(1, A1, 2)}}
 +
 +
Then press Ctrl+Shift+Enter.
 +
 +
[[Image:xl3gridarraylookup.png|thumb|center|600px]]
 +
 +
Note that any cells outside of the data area return #N/A
  
 
==See Also==
 
==See Also==

Revision as of 10:49, 8 September 2017

Returns the result of an MDX query as an array. This is a CSE/Array formula so must be entered into a range at once using Ctrl+Shift+Enter.

This is the fastest way to return cube results into Excel, but limits your options for altering the query.

Syntax

XL3GridArrayLookup( Connection, Mdx, [MemberHandling] )

Parameters

Parameter Description
Connection Connection number to use
Mdx The query to run. Typically from a cell so that the query can be updated.
MemberHandling Optional, how to output members
0/Missing Members not displayed
1 Member unique names
2 Member captions

Example

Here we have our MDX statement in cell A1. We select the range we want to output the results to, and type

Then press Ctrl+Shift+Enter.

Xl3gridarraylookup.png

Note that any cells outside of the data area return #N/A

See Also