W
Warren
Can someone please help with the function INDIRECT?
I am using INDIRECT to compose a Summary sheet, which pulls data from the
data sheets.
For example:
I have, say 50 sheets, in a workbook. The sheets are named Summary, AAA,
BBB, CCC..... (the data sheets are AAA, BBB....) in the workbook.
On the Summary sheet
Column A contains the names of all the data sheets in the workbook.
For example:
A1 has 'AAA'
A2 has 'BBB'
A3 has 'CCC'
In the other cells of the Summary sheet, I have the formula like
In B1 =indirect($A1&"!C3"), in C1 =indirect($A1&"!T4")
In B2 =indirect($A2&"!C3"), in C2 =indirect($A2&"!T4")
and so on, to pull the data from the data sheets
This works fine until I add columns or make changes to the data sheets.
Since the INDIRECT formula take text as its input, if I add a column on
sheet AAA, where column C becomes column D, and T becomes U, then the
summary sheet would be summarizing the wrong items. i.e., the data I want
are now in Column D and U, not C and T.
It is easy if I only have few sheets in the workbook and I only want few
data items. I can just manually type in the formula =AAA!C3. However, if I
have 50 sheets in the
workbook and I want 50 different data items from each sheet, it would be
very difficult to enter the formula manually. I would like to have a
generic formula, like INDIRECT, that are flexible enough to allow me to
compose a Summary sheet and be able to add columns to the data sheets and
still reference to the right cells.
Can anyone help?
Thanks
wachen
I am using INDIRECT to compose a Summary sheet, which pulls data from the
data sheets.
For example:
I have, say 50 sheets, in a workbook. The sheets are named Summary, AAA,
BBB, CCC..... (the data sheets are AAA, BBB....) in the workbook.
On the Summary sheet
Column A contains the names of all the data sheets in the workbook.
For example:
A1 has 'AAA'
A2 has 'BBB'
A3 has 'CCC'
In the other cells of the Summary sheet, I have the formula like
In B1 =indirect($A1&"!C3"), in C1 =indirect($A1&"!T4")
In B2 =indirect($A2&"!C3"), in C2 =indirect($A2&"!T4")
and so on, to pull the data from the data sheets
This works fine until I add columns or make changes to the data sheets.
Since the INDIRECT formula take text as its input, if I add a column on
sheet AAA, where column C becomes column D, and T becomes U, then the
summary sheet would be summarizing the wrong items. i.e., the data I want
are now in Column D and U, not C and T.
It is easy if I only have few sheets in the workbook and I only want few
data items. I can just manually type in the formula =AAA!C3. However, if I
have 50 sheets in the
workbook and I want 50 different data items from each sheet, it would be
very difficult to enter the formula manually. I would like to have a
generic formula, like INDIRECT, that are flexible enough to allow me to
compose a Summary sheet and be able to add columns to the data sheets and
still reference to the right cells.
Can anyone help?
Thanks
wachen