
| Excel INDIRECT Function |
|
|
|
|
The INDIRECT Function will return the reference specified by a text string. For example, if you have a cell reference in cell A1 (e.g. A1 value = “B15”; B15 value = 25), the INDIRECT function will allow you to refer to A1 but return the value of the cell in the formula cell. In this case the INDIRECT function would return 25. So why use the INDIRECT function if you could just refer to B15 in the first place? The INDIRECT function will add some flexibility to your worksheet, particularly if you have a very large, complicated worksheet and are constantly changing its structure (adding rows and columns, etc.) INDIRECTSyntax: =INDIRECT(Cell where the reference is placed, True/False) Arguments: 2 (1 optional)
Cell Name Referencing StyleUsing the cell name style of referencing (e.g. A1), cell B15 in this example refers to cell B10. Since cell B10 refers to cell B3, the formula returns the value of B3 which is 127.
R1C1 Referencing StyleThis example in cell B16 uses the R1C1 style of referencing to display Nancy’s February totals.
Using a Range NameIn cell B17 the formula references the “Jan” range name. Jan is defined as the range B3:B7.
Building a Cell Reference with a Text StringThis last example builds the cell referencing using text and the contents of cells B12 and B13. Here, if your spreadsheet is constantly changing, you can just change the values in the reference cells (in this case B12 & B13) instead of altering your formula. ![]() Using INDIRECT To Reference A Fixed AddressYou can also use the INDIRECT function to build a reference to always refer to a specific cell or range even if you insert rows or columns. Suppose you always want to refer to cell A1 even if you insert rows or columns preceding the cell. If you use the $A$1 referencing in your formula, after inserting a row the reference in that cell becomes $A$2. If you always want to refer to cell A1 no matter how your worksheet structure changes, create a range that uses the INDIRECT function.
For more information on range names see Excel Range Names - Creating and Using
|
| < Prev | Next > |
|---|