Ok, here's an attempt to put some thoughts to paper.
Let's say we have in col D, row1 downwards
20 numbers 1,2,3,4,5,6 ... 20
And we want to re-arrange these numbers in col D
in a row-wise manner, say, 5 at a time
into cols E - I, so that it appears in E1:I4 as
1,2,3,4,5
6,7,8,9,10
11,12,13,14,15
16,17,18,19,20
Doing this "manually" via direct link formulae would
require putting:
in E1: = D1
in F1: = D2
in G1: = D3
in H1: = D4
in I1: = D5
in E2: = D6
in F2: = D7
in G2: = D8
in H2: = D9
in I2: = D10
and so on
Using INDIRECT() allows a way to frame something up in the start cell E1
which will give the same result as if we had used the link formula : =D1
If we put in E1: =INDIRECT("D1"), it's equivalent to putting in E1: =D1
But to enable us to simply copy E1 across and down to get the required
arrangement, another formula is needed inside INDIRECT(),
one which will increment the number next to "D":
In steps of 1 as we copy across columns, and,
In steps of 5* as we copy down rows
*This usually implies use of the "5" as the multiplier for the ROW()
i.e. we got to use 5*ROW() ....
The "D" is a constant here, so we don't have to worry about it
That's where ROW() and COLUMN() comes in, for use as incrementers,
either on its own, or more often, in various combinations of both together
Experimentation is needed to get a correct "magic" combination
of ROW() and COLUMN() which will fit the bill nicely <g>
Some points we can bear in mind:
-----------------------------------------
ROW() returns the row # of the cell it is in
ROW() remains constant as we copy across the row
ROW() is useful as an incrementer as we copy down the column
(If the step as we copy down is 5, use this "5" as a multiplier
COLUMN() returns the column # of the cell it is in
COLUMN() remains constant as we copy down the column
COLUMN() is useful as an incrementer as we copy across the row
So as a first try, we could say, put in E1: =INDIRECT("D"&COLUMN()-4)
which still returns the same result as if we had put in E1: =D1,
but allows us to copy E1 across,
with the resulting cell references nicely incremented: D1, D2, D3, D4 & D5
inside INDIRECT()
As our start cell E1 is in col E (i.e. col#5), "COLUMN()-4"
is used to evaluate and return "1" (We have to subtract "4")
Now we can copy E1 across to I1 and get the results for the first 5 cells
but we still can't copy down to get the rest.
Back to the excel sheet for further experimentation.
We'll throw in use of ROW() and COLUMN() together in various combinations
until finally, voila! we hit one combo which seems to fit the bill nicely
viz.: =5*ROW()-8+COLUMN()-1
That's how we'll finally arrive at a workable formula for E1:
=INDIRECT("D"&5*ROW()-8+COLUMN()-1)
which, when copied across to I1, then down to I4
would give us exactly what we're after
Hope the above gives you some ideas on use of INDIRECT()
and on the use of ROW() and COLUMN() inside INDIRECT
as incrementers
Check up more examples on use of INDIRECT() in Google's archives
Play & experiment around. You'll soon get the hang of using it !
----------------------------
In case you're interested, here's a couple of links
to some of my previous suggestions to posts
which use INDIRECT():
http://tinyurl.com/23v8c
http://tinyurl.com/2rljj
http://tinyurl.com/2242e