Advance excel - indirect function

Excel 1420 views 10 replies

To understand benefit of indirect function do as I say.  Put 100 in cell A1, now in Cell D1 put formula =INDIRECT("A1") & in cell D2 put formula =A1.

 

 

Result is same in both case then why to put confusing formula in cell D2?

 

Now select column A & delete it! What you see now in Cell C1 & C2?

 

 

So here lies difference, after deleting col A formula in C2 goes off & changes to =#REF! but formula in cell C1 remains intact.

 

So when you are preparing financial models or projects & you are required to refer to cells & sheets which changes frequently you can use indirect function.

 

So while moving or copying formula from one workbook to another workbook your reference remains intact in same workbook & not to workbook from the sheet where you moved your data.

 

Let us see more way of using indirect function.

 

 

 

Formula

Descriptttttion (Result)

=INDIRECT($A$2)

Value of the reference in cell A2 (1.333)

=INDIRECT($A$3)

Value of the reference in cell A3 (45)

=INDIRECT($A$4)

If the cell B4 has the defined name "George," the value of the defined name is returned (10)

=INDIRECT("B"&$A$5)

Value of a reference in cell A5 (62)

 

Lets see advance usage:

 

Suppose you have 100 sheets in your workbook name after debtors name & in Cell A1 of each cell there is total amount receivable from each debtors, your boss want to create sheet with Name of Debtors & amount receivable from each Debtors. Task is easy & you can complete it in 30 mins.

 

But what if there is 500 of such sheets from you need to take values?

 

With indirect function you can do in 5 mins or in less time, lets see how:

 

Create header by putting Name in cell A1 & Amount in cell B1.

 

Now in cola beginning cell A2 put name of sheet, which you can get it from your master data as it is name of your debtors only.

 

In cell B2 put formula =INDIRECT("'"&A2&"'!A1") & you will get values cell A1 from Sheet named Raj .

 

Now you just need to drag down / copy paste formula from cell A2 to all cells & you are done.

 

(See attached file for illustration)

 

Do post query / feedback / questions.

Source:Self/Microsoft


Attached File : 112266 1360938 indirect function.xls downloaded: 1730 times
Replies (10)

thanks for sharing so much useful information.

yes

Thank you so much for sharing the article bhai!

Thanks a lot for sharing a valuable information.

Thanx for sharing vaibhav jiyes..

Very good knowledge sharing, thanks.

Could not get this formula.

Formula

Descriptttttttion (Result)

=INDIRECT($A$2)

Value of the reference in cell A2 (1.333)

=INDIRECT($A$3)

Value of the reference in cell A3 (45)

=INDIRECT($A$4)

If the cell B4 has the defined name "George," the value of the defined name is returned (10)

=INDIRECT("B"&$A$5)

Value of a reference in cell A5 (62)

@ AMIT.

=INDIRECT(A2) when evaluated referes to cell containing its value, since value of cell A2 is B2 INDIRECT(A2) gives value of cell B2 i.e. 1.333.

 

Thanks

Useful Sharing..

Good sharing ....yes

Source/Credits: exceltrick.com

An example of Indirect Function in shown in the below image.

Excel Indirect Function Example

Here an indirect function is written that points to cell “C2”.

The “C2” cell in turn points to “A6” and the value of “A6” cell is 27. And hence the indirect function used in the example results into 27.

Why to Choose Indirect Function over Direct Referencing:

If you don’t know about direct referencing in excel then I must tell you that it is a method that looks very similar to Indirect function. To perform direct referencing simple enter a cell reference prefixed by an “=” sign. E.g. ‘=A6’

As we all know that indirect referencing can help to deal you with variable cell reference in a better way. This is not true in the case of direct referencing.

Direct vs Indirect Reference

In the above example if you have a table as shown in the above image and you have a direct reference to the cell “A2” and an Indirect reference by using the Indirect function. Now at this instance both these fetch you the same result.

But if you inset a new row at A2 position, then the direct reference to A2 will now point to cell “A3” whereas the indirect reference does not change. This is called locking of a reference.

Using Excel Indirect formula for R1C1 References:

Using Excel Indirect formula for locating R1C1 references is easy. R1C1 is a format where both the rows and columns are defined using numbers. R stands for Row and C stands for column. R2C3 stands for Row 2 and Column 3 i.e. C2. You can read more about R1C1 references here.

R1C1 Indirect Function

In the above image I have used the Indirect Function as:

=INDIRECT(C2,FALSE)

In this C2 indicates the reference and the second parameter “FALSE” indicates that the reference is in R1C1 format. On the C2 cell the value is R3C1, which means that it is pointing to Row 3 and column 1. And the value at Row 3 and Column 1 is 26.

Indirect function using references from two different strings:

You can also supply the references to the indirect function from two separate text strings. For instance you can also write the Indirect function as in the below snapshot.

Indirect function using references from two different strings

In the above example the Indirect function is written as:

=INDIRECT("A"&C1)

This tells Microsoft excel to take half the reference (The alphabet part) as “A” and the other half (the numeric part) from the cell “C1”. In the above example the cell “C1” contains 6 and thus the reference results into “A6” which has a value: 28. And that’s what the indirect function in the example fetches.

 

 


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register