Questions tagged [excel-indirect]

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

Syntax

INDIRECT(ref_text, a1)

Ref_text

A reference to a cell that contains an A1-style reference, an R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string.

  • If ref_text is not a valid cell reference, INDIRECT returns the #REF! error value.
  • If ref_text refers to another workbook (an external reference), the other workbook must be open. If the source workbook is not open, INDIRECT returns the #REF! error value.
  • If ref_text refers to a cell range outside the row limit of 1,048,576 or the column limit of 16,384 (XFD), INDIRECT returns a #REF! error.

Note:

This behavior is different from Excel versions earlier than Microsoft Office Excel 2007, which ignore the exceeded limit and return a value.

A1

A logical value that specifies what type of reference is contained in the cell ref_text.

  • If a1 is TRUE or omitted, ref_text is interpreted as an A1-style reference.
  • If a1 is FALSE, ref_text is interpreted as an R1C1-style reference.

Reference links


Tag wiki credits to Microsoft Office documentation of function.

290 questions
34
votes
7 answers

Dynamic chart range using INDIRECT: That function is not valid (despite range highlighted)

I'm trying to create a chart with a range built dynamically using the INDIRECT function. Excel does recognize the range I am creating using INDIRECT as it highlights the corresponding range on the sheet: However when saving the chart, I get an…
Max
  • 12,794
  • 30
  • 90
  • 142
7
votes
1 answer

Automatically increment sheet reference when dragging formula

I have a formula with the following syntax: =SheetName!E10 and need some way to drag the formula and change just the sheet name as it moves to the right. So the E10 part needs to stay the same with the sheet number incrementing as I drag the…
OneFineDay
  • 9,004
  • 3
  • 26
  • 37
5
votes
3 answers

C# Excel Dependent Picklist with Validation & Indirect

Below is a generic attempt at creating dependent picklists dynamically from C#. When value 'A' is selected from pick1, pick2 is supposed to display the values from the SecondaryRangeA. This code almost works, but instead of displaying the…
Joshua Lowry
  • 1,075
  • 3
  • 11
  • 30
5
votes
1 answer

Alternative to INDIRECT

I'm using the INDIRECT function to fetch data from another table sheet. The direct way would be "sheetname!A5". I need it dynamically, so the sheetname is also part of the table, using indirect "indirect("'"&G$1&"'!A5"), whereas G1 contains the…
user3337882
  • 51
  • 1
  • 1
  • 3
5
votes
3 answers

Returning cell values from other sheets by referencing sheet names from a list

I have a spreadsheet with approx twenty different sheets named by stock ticker. Because these are templates, the information in each sheet is found in the same cells. For example, the EPS for the current year is always in cell A55 regardless of the…
4
votes
2 answers

How to use two cells values as row and column coordinates for referencing another cell?

I have a range of cells containing numbers, and a range of cells containing letters. E.g. if I had a value of d in one cell, and 7 in another cell, how would I get the value of cell D7? How do I use a combination of one of the letters and one of the…
4
votes
3 answers

How to code Excel VBA equivalent of INDIRECT function?

I have many uses of the INDIRECT function in my workbook, and it is causing performance issues. I need to replace them with something that will give me the same results. All the INDIRECTS recalculate anytime anything is changed, causing the workbook…
Reeggiie
  • 782
  • 7
  • 16
  • 36
4
votes
1 answer

Creating a VLOOKUP that references another sheet, but the sheet name is the content of a cell

I'm trying to create a VLOOKUP for billing purposes. I need to have the number of last month's documents in the current month's billing information. I have the VLOOKUP working with no problems, but I want to name the sheet after the month and have…
4
votes
1 answer

Find maximum value between specified date range

I have a range of daily dates in column G and a range of stock prices in column H. I would like to find a rolling 52 week high, i.e. the highest stock price in column H between the current date and the same date 1 year prior. I am using the…
user2209979
  • 159
  • 1
  • 5
  • 10
3
votes
2 answers

Populate empty table with data from other tables based on dropdown list selection

I have several tables in one tab which I have named individually. In another tab I have a table that I wish to populate with the same information of the selected table based on a drop down selection. All tables are the same size. The dropdown is…
actuario99
  • 103
  • 2
  • 7
3
votes
2 answers

How do I use INDIRECT inside an Excel array formula?

The situation In the sheet "Planning" I have an area that contains pairs of sessions (strings) and hours (numbers) in adjacent cells (e.g. D11 and E11, I12 and J12 etc.) One session can occur multiple times. D11:E11 is | Foo | 8 | I12:J12 is | Foo…
krowl
  • 31
  • 1
  • 5
3
votes
2 answers

Excel, How to use average with indirect?

I've been trying to use AVERAGE with INDIRECT but keeps giving me errors. Now I am using Average like this: AVERAGE(Results!C2:C51) I need to get data from another sheet "Results". But in my current sheet I got the range of the rows set in two…
Danick
  • 135
  • 2
  • 9
3
votes
1 answer

Why does INDIRECT() not work with name references?

As far as my understanding goes, if you have value 5 in H4, there are two ways to reference that cell that both work: =H4 and =INDIRECT("H4") I can't figure out a way to make this work with name references though. For example, if I have some data…
IneffaWolf
  • 73
  • 11
3
votes
1 answer

indirect row excel address

I have a table with numeric values within C20:G30. I would like to extract the top 10 values via MAX(LARGE($BG$26:$BT$69;1)) MAX(LARGE($BG$26:$BT$69;2)), etc. That I managed to do. Then, I would like to retrieve the addresses of these top 10…
Martin G
  • 33
  • 5
3
votes
3 answers

Excel, indirect reference to range of sheets

Trying to use INDIRECT to reference a range of sheets, and a range of cells in those sheets, looking for the MAX. Neither of these work: =MAX(INDIRECT("1:"&last_sheet&"!G"&ROW()&":K"&ROW())) =MAX(INDIRECT("1:6!G"&ROW()&":K"&ROW())) However, this…
rainrunner
  • 118
  • 1
  • 9
1
2 3
19 20