Function - INDIRECT
INDIRECT function adds realy dynamism to your formulas.
Suppose you want to sum the values in Col A and currently have 10 items (in cells A2 to A11). You can use the following formula to get the result;
=SUM(A2:A11)
As you add more items you need to update the end cell address from A11.
INDIRECT gives you a way to avoid this.
Let us say you have the last cell address in B2...
Update your formula to;
=SUM(INDIRECT("A2:" & B2))
You can have just the row number of the last cell in B2 (eg. 100) then you can use
=SUM(INDIRECT("A2:A" & B2))
This is same as
=SUM(A2:A100)
INDIRECT basically evaluates its argument (("A2:A" & B2) and passes on the result (A2:A100) to SUM.
All you need to take care is that the result from INDIRECT is what the function surroungding your INDIRECT function expects.
- SheelooC's blog
- Login or register to post comments
- 4022 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago