INDEX Function: Print the value with intersection of row and column:

Syntax: 
=INDEX (array, row_num, [col_num], [area_num])

Arguments: 
array - A range of cells, or an array constant.
row_num - The row position in the reference or array.
col_num - [optional] The column position in the reference or array.
area_num - [optional] The range in reference that should be used.

Usage notes: 
Use the INDEX function to get a value from a list or table based on its location.
For example, the formula =INDEX(A1:B5,3,3) will return the value at the address B3.

The INDEX function has two forms: array and reference.
  • Array form:
In the array form of INDEX, the first parameter is array, which is supplied as a range of cells or an array constant. The syntax for the array form of INDEX is:

INDEX (array, row_num, [col_num])
If both row_num and col_num are supplied, INDEX returns the value in the cell at the intersection of row_num and col_num.
If your row_num is set to zero, INDEX returns an array of values for the entire row. To use these array values, enter the INDEX function as an array formula in horizontal range.
If you col_num is set to zero, INDEX returns an array of values for the entire column. To use these array values, enter the INDEX function as an array formula in vertical range. 
  • Reference form
In the array form of INDEX, the first parameter is reference, which is supplied as a reference to one or more cell ranges. The syntax for the reference form of INDEX is:

       INDEX (reference, row_num, [col_num], [area_num])
The reference form of INDEX returns the reference of the cell at the intersection row_num and col_num.
If reference is supplied as multiple ranges,  area_num indicates which range to use.
area_sum is supplied as a number.
For example, in the formula =INDEX((A1:C5,A7:C10),2,2,2),area_num is supplied as 2, which refers to the range A7:C10.

Examples:

1. Print the value which is existing in the intersection of row 84 and in column 13:

=INDEX('Sheet_Name'!1:1048576,84,13)


array - 'Sheet_Name'!1:1048576  (Check in complete sheet Sheet_Name)
row_num - 84
col_num - 13

2. Print the data present in intersection of the column and row values (data retrieved from above formulas):

=INDEX('Sheet_Name'!1:1048576,MATCH("Grand Total",'Sheet_Name'!$A:$A,0),MATCH(A7,'Sheet_Name'!A8:Z8,0))

array - 'Sheet_Name'!1:1048576  (Check in complete sheet Sheet_Name)
row_num - MATCH("Grand Total",'Sheet_Name'!$A:$A,0)
col_num - MATCH(A7,'Sheet_Name'!A8:Z8,0)


For more info regarding MATCH function: MATCH

No comments:

Post a Comment

Thank You.

https://linwintech.blogspot.com/