You are on page 1of 8

Data Analytics Lab Part- A: Spreadsheet (Excel) Lab6

Contents
1. OFFSET:..............................................................................................................................................1
2. CHOOSE:............................................................................................................................................1
Syntax...............................................................................................................................................2
3. LET:....................................................................................................................................................2
Syntax...............................................................................................................................................2
4. MAX:..................................................................................................................................................3
5. SORT:.................................................................................................................................................4
Syntax...............................................................................................................................................4
6. SORTBY:.............................................................................................................................................5
Syntax...............................................................................................................................................5
7. RANK:.................................................................................................................................................6
Syntax...............................................................................................................................................6

1. OFFSET:
The OFFSET function returns a cell or range of cells that is a specified number of rows and columns
from a reference cell.

Syntax: OFFSET(reference, rows, cols, [height], [width])

Example:

Cell A1 contains 10, A2 contains 20, A3 contains 30

Formula: =OFFSET(A1, 1, 0)

Result: 20 (the value 1 row below A1)


2. CHOOSE:
The CHOOSE function returns a value from a list of values based on a specified index number.

Syntax: CHOOSE(index_num, value1, [value2], ...)

Example:

Formula: =CHOOSE(2, "Apple", "Banana", "Cherry")

Result: "Banana" (the 2nd value in the list)

Syntax
=CHOOSE(index_num,value1,[value2],...)

 index_num - The value to choose. A number between 1 and 254.

 value1 - The first value from which to choose.

 value2 - [optional] The second value from which to choose.


3. LET:
The LET function allows you to assign names to calculation results or intermediate values in a
formula, making it easier to read and maintain.

Syntax: LET(name1, value1, [name2], [value2], ..., calculation)

Example:

Formula: =LET(x, 5, y, 3, x * y)

Result: 15 (the product of 5 and 3)

Syntax
=LET(name1,value1,[name2/value2],...,result)

 name1 - First name to assign. Must begin with a letter.

 value1 - The value or calculation to assign to name 1.

 name2/value2 - [optional] Second name and value. Entered as a pair of


arguments.

 result - A calculation or a variable previously calculated.


4. MAX:
The MAX function returns the largest value in a set of numbers.

Syntax: MAX(number1, [number2], ...)

Example:

Cell A1 contains 10, A2 contains 20, A3 contains 30

Formula: =MAX(A1:A3)

Result: 30 (the largest value in the range A1:A3)


5. SORT:
The SORT function sorts a range or an array of values based on the specified sorting order.

Syntax: SORT(array, [sort_index], [sort_order], [by_col])

Example:

Cell A1 contains "Banana", A2 contains "Apple", A3 contains "Cherry"

Formula: =SORT(A1:A3)

Result: {"Apple"; "Banana"; "Cherry"} (the sorted list in ascending order)

Syntax
=SORT(array,[sort_index],[sort_order],[by_col])

 array - Range or array to sort.

 sort_index - [optional] Column index to use for sorting. Default is 1.

 sort_order - [optional] 1 = Ascending, -1 = Descending. Default is ascending


order.

 by_col - [optional] TRUE = sort by column. FALSE = sort by row. Default is


FALSE.
6. SORTBY:
The SORTBY function sorts a range or an array based on the values in another corresponding range
or array.

Syntax: SORTBY(array, by_array1, [sort_order1], [by_array2], [sort_order2], ...)

Example:

A1 contains "Banana", A2 contains "Apple", A3 contains "Cherry"

B1 contains 20, B2 contains 10, B3 contains 30

Formula: =SORTBY(A1:A3, B1:B3)

Result: {"Apple"; "Banana"; "Cherry"} (sorted based on the values in column B)

Syntax
=SORTBY(array,by_array,[sort_order],[array/order],...)

 array - Range or array to sort.

 by_array - Range or array to sort by.

 sort_order - [optional] Sort order. 1 = ascending (default), -1 = descending.

 array/order - [optional] Additional array and sort order pairs.


7. RANK:
The RANK function returns the rank of a number within a set of numbers, where 1 is the highest
rank.

Syntax: RANK(number, ref, [order])

Example:

Cell A1 contains 10, A2 contains 20, A3 contains 30

Formula: =RANK(A1, A1:A3, 0)

Result: 3 (the rank of the value in A1 within the range A1:A3, in descending order)

Syntax
=RANK(number,ref,[order])

 number - The number to rank.

 ref - The range that contains numbers to rank against.

 order - [optional] Whether to rank in ascending or descending order.

You might also like