# Lookup Functions - Indirect, Offset

**INDIRECT**

The INDIRECT function is useful when you want to return a value, based on a text string. For example, select a range name from a drop down list, and get the total amount for the selected range. In this screen shot, choose Actual or Budget in cell B2, and the total appears in cell B3.

![](https://2721809844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LR_tHSREe3Wm40fY9NG%2F-LRwPdYodWPpXassVhJj%2F-LRwSSsU3PZUNE5XjhXr%2Fimage.png?alt=media\&token=c4ccc8eb-82b0-4d2a-b901-9637df0c2330)

**INDIRECT Function Arguments**

The INDIRECT function has two arguments: **INDIRECT(ref\_text,a1)**

1. **ref\_text**: A cell reference or a text string (or both), that create a range reference to a cell, range of cells or named range.
2. **a1**: (optional) Does the reference use A1 reference style?
   * TRUE, or omitted -- ref\_text is must be "A1" style
   * FALSE -- ref\_text must be "R1C1" style

{% file src="<https://2721809844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LR_tHSREe3Wm40fY9NG%2F-LRwPdYodWPpXassVhJj%2F-LRwTDZxI-D_AizxNTm3%2FIndirect%20Function.xlsx?alt=media&token=6b936ac2-f768-4b27-9b57-2ead91b7ee13>" %}
INDIRECT FORMULA Example
{% endfile %}

**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.<br>

> **= OFFSET(reference, rows, cols, \[height], \[width])**

The OFFSET function syntax has the following arguments:

* **Reference**    Required. The reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
* **Rows**    Required. The number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference).
* **Cols**    Required. The number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference).
* **Height**    Optional. The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
* **Width**    Optional. The width, in number of columns, that you want the returned reference to be. Width must be a positive number.

{% file src="<https://2721809844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LR_tHSREe3Wm40fY9NG%2F-LRwPdYodWPpXassVhJj%2F-LRwVPL1KItrIi8KKvwe%2Foffset%20as%20lookup%20function.xlsx?alt=media&token=6f4d4c7e-a048-4ce0-af21-4baffa5f254a>" %}
OFFSET as Lookup Function Example
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://books-gyansetu.gitbook.io/advanced-excel/functions-indirect-offset-iferror.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
