ARRAY function
ARRAY
The Klipfolio ARRAY function lets you join together single values and return those values as a single column of data in the order provided. You can use the ARRAY function to combine data from many different data sources.
The syntax for the ARRAY function is:
ARRAY( data )
Parameters
data | The value or values | vector |
ARRAY examples
Let's look at some ARRAY function examples.
A |
B |
C |
D |
|
1 | Apples | 10 | 20 | 30 |
2 | Oranges | 1,000 | 2,000 | 3,000 |
The following examples are based on the above text from an Excel spreadsheet:
ARRAY( A1 , A2 )
-> [Apples, Oranges]
The result lets you select two different cells and have the contents of those cells appear in one column.
ARRAY( NUMBERFORMAT( B2:D2 , precision , separator ) data )
-> [1000, 2000, 3000]
The result lets you select a range of cells and have the values appear in one column. You must use the NUMBERFORMAT function for values that contain a comma.
ARRAY( SUM( SLICE( 1:1 , 1 , end ), data ) , SUM( SLICE( 2:2 , 1 ) ) , data )
-> [60, 6000 ]
The result lets you select two different rows and have the values added together in one column. This formula uses the SLICE function to specify the exact values to include in the SUM function. The end
value for the SLICE is left blank meaning that if additional columns are added to the formula, those values will be automatically included in the formula.