In this article, we will learn how to retrieve the Nth value in a Row, Column, and range. We use a combination of “OFFSET”, “Index”, and “ROW” functions in Microsoft Excel 2010.
OFFSET: -One of the rows and columns in a range that is a specified number of the cells or range of cells has a reference returned references. A single cell or range of cells, you may have to be returned to the number of rows and number of columns, can be specified.
The syntax of OFFSET function: =OFFSET (reference, rows, cols, height, width)
Reference:- This is a cell or range from which you want to offset.
Rows and Columns to move: - How many rows you want to move from the starting point, and both of these can be positive, negative or zero.
Height and Width: - This is the size of the range you want to return.
Let’s take an example to understand how the Offset function works in excel.
We have data in range A1:D10 in which column A contains Product Code, Column B contains Quantity, column C contains per product cost and column D contains Total cost. We want to return the value of cell C5 in cell E2.
Follow below mentioned steps.
ROW: - This function is used to return the row number of a cell reference.
Syntax of “ROW” function: =ROW (reference)
Example: =ROW (A1) would return 1
=ROW (A1:A10) would return 1
=ROW (A1:C10) would return 1
INDEX: The Index formula returns a value from the intersection between the row number and the column number in an Array. There are 2 syntaxes for the “INDEX” function.
1st Syntax of “INDEX” function:=INDEX (array, row_num, [column_num])
2nd Syntax of “INDEX” function:=INDEX (reference, row_num, [column_num], [area_num])
For example, we have data in range A1:C5 in which column A contains Order Id, column B contains Unit Price, and column C contains Quantity.
Follow below given steps:-
Let’s take an example to understand how we can retrieve the Nth value in a row, column and range.
We have data in range A1:B12.
To retrieve the Nth value in the column, follow below given steps:-
To retrieve the Nth value in the Row, follow below given steps:-
To retrieve the Nth value in the Range, follow below given steps:-
This is the way we can retrieve the Nth value in a row, column, and range in Microsoft Excel 2010.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.