Functions Language

Bottom

The Bottom() function returns the last element of an array.

Related functions: Top

Syntax


Bottom (Array, No of rows)

Array The input array
No of rows How many elements to return, counting backwards from the end of the array.

Examples


Example 1. Return the bottom element of the array

Example 2. Return the bottom three elements of the array

Example 3. Used Bottom() in Excel in an expression

Consider the following input array:

Input array
A 1 11
B 2 22
C 3 33
D 4 44
E 5 55
F 6 66
G 7 77

Example 1. Return the bottom element of the array


This example returns a single element (row) from the bottom of the example input array above.

Function
Bottom(Input Array,1)
Output
G 7 77

Example 2. Return the bottom three elements of the array


This example returns three elements (rows) from the bottom of the example input array.

Function
Bottom(Input Array,3)
Output
E 5 55
F 6 66
G 7 77

Example 3. Used Bottom() in Excel in an expression


This example returns the cumulative sum of the rows in an array starting from the bottom. The keyword ‘line‘ allows a line-by-line iteration through the array items (V1).

Range Function
1 =Transform(A1:A5,”Sum(Bottom(V1,line))”)
2
3
4
5
Range Output
1 5
2 9
3 12
4 14
5 15