# PHPExcel_Calculation_LookupRef

class
**PHPExcel_Calculation_LookupRef**

PHPExcel*Calculation*LookupRef

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

## Methods

CELL_ADDRESS

COLUMN

COLUMNS

ROW

ROWS

OFFSET

CHOOSE

MATCH

INDEX

TRANSPOSE

VLOOKUP
The VLOOKUP function searches for value in the left-most column of lookup*array and returns the value in the same row based on the index*number.

HLOOKUP
The HLOOKUP function searches for value in the top-most row of lookup*array and returns the value in the same column based on the index*number.

LOOKUP The LOOKUP function searches for value either from a one-row or one-column range or from an array.

## Details

###
at line 80
```
static string
```**CELL_ADDRESS**(row $row, column $column, relativity $relativity = 1, referenceStyle $referenceStyle = true, sheetText $sheetText = '')

**CELL_ADDRESS**(row $row, column $column, relativity $relativity = 1, referenceStyle $referenceStyle = true, sheetText $sheetText = '')

CELL_ADDRESS

Creates a cell address as text, given specified row and column numbers.

Excel Function: =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])

###
at line 133
```
static integer
```**COLUMN**(cellAddress $cellAddress = null)

**COLUMN**(cellAddress $cellAddress = null)

COLUMN

Returns the column number of the given cell reference If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the COLUMN function appears; otherwise this function returns 0.

Excel Function: =COLUMN([cellAddress])

###
at line 176
```
static integer
```**COLUMNS**(cellAddress $cellAddress = null)

**COLUMNS**(cellAddress $cellAddress = null)

COLUMNS

Returns the number of columns in an array or reference.

Excel Function: =COLUMNS(cellAddress)

###
at line 210
```
static integer
```**ROW**(cellAddress $cellAddress = null)

**ROW**(cellAddress $cellAddress = null)

ROW

Returns the row number of the given cell reference If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the reference of the cell in which the ROW function appears; otherwise this function returns 0.

Excel Function: =ROW([cellAddress])

###
at line 254
```
static integer
```**ROWS**(cellAddress $cellAddress = null)

**ROWS**(cellAddress $cellAddress = null)

ROWS

Returns the number of rows in an array or reference.

Excel Function: =ROWS(cellAddress)

###
at line 287
```
static mixed
```**HYPERLINK**(string $linkURL = '', string $displayName = null, PHPExcel_Cell $pCell = null)

**HYPERLINK**(string $linkURL = '', string $displayName = null, PHPExcel_Cell $pCell = null)

HYPERLINK

Excel Function: =HYPERLINK(linkURL,displayName)

###
at line 328
```
static mixed
```**INDIRECT**(cellAddress $cellAddress = null, PHPExcel_Cell $pCell = null)

**INDIRECT**(cellAddress $cellAddress = null, PHPExcel_Cell $pCell = null)

INDIRECT

Returns the reference specified by a text string. References are immediately evaluated to display their contents.

Excel Function: =INDIRECT(cellAddress)

NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010

###
at line 395
```
static string
```**OFFSET**(cellAddress $cellAddress = null, rows $rows, cols $columns, height $height = null, width $width = null)

**OFFSET**(cellAddress $cellAddress = null, rows $rows, cols $columns, height $height = null, width $width = null)

OFFSET

Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.

Excel Function: =OFFSET(cellAddress, rows, cols, [height], [width])

###
at line 483
```
static mixed
```**CHOOSE**()

**CHOOSE**()

CHOOSE

Uses lookup*value to return a value from the list of value arguments.
Use CHOOSE to select one of up to 254 values based on the lookup*value.

Excel Function: =CHOOSE(index_num, value1, [value2], ...)

###
at line 523
```
static integer
```**MATCH**(lookup_value $lookup_value, lookup_array $lookup_array, match_type $match_type = 1)

**MATCH**(lookup_value $lookup_value, lookup_array $lookup_array, match_type $match_type = 1)

MATCH

The MATCH function searches for a specified item in a range of cells

Excel Function:
=MATCH(lookup*value, lookup*array, [match_type])

###
at line 620
```
static mixed
```**INDEX**(range_array $arrayValues, row_num $rowNum, column_num $columnNum)

**INDEX**(range_array $arrayValues, row_num $rowNum, column_num $columnNum)

INDEX

Uses an index to choose a value from a reference or array

Excel Function:
=INDEX(range*array, row*num, [column_num])

###
at line 674
```
static array
```**TRANSPOSE**(array $matrixData)

**TRANSPOSE**(array $matrixData)

TRANSPOSE

###
at line 714
```
static mixed
```**VLOOKUP**(lookup_value $lookup_value, lookup_array $lookup_array, index_number $index_number, not_exact_match $not_exact_match = true)

**VLOOKUP**(lookup_value $lookup_value, lookup_array $lookup_array, index_number $index_number, not_exact_match $not_exact_match = true)

VLOOKUP
The VLOOKUP function searches for value in the left-most column of lookup*array and returns the value in the same row based on the index*number.

###
at line 777
```
static mixed
```**HLOOKUP**(lookup_value $lookup_value, lookup_array $lookup_array, index_number $index_number, not_exact_match $not_exact_match = true)

**HLOOKUP**(lookup_value $lookup_value, lookup_array $lookup_array, index_number $index_number, not_exact_match $not_exact_match = true)

HLOOKUP
The HLOOKUP function searches for value in the top-most row of lookup*array and returns the value in the same column based on the index*number.

###
at line 840
```
static mixed
```**LOOKUP**(lookup_value $lookup_value, lookup_vector $lookup_vector, result_vector $result_vector = null)

**LOOKUP**(lookup_value $lookup_value, lookup_vector $lookup_vector, result_vector $result_vector = null)

LOOKUP The LOOKUP function searches for value either from a one-row or one-column range or from an array.