View Single Post
  #7   Report Post  
Domenic
 
Posts: n/a
Default nonsequential cell references

If we take a look at the following...

=INDEX(A$4:A$65536,ROWS(L$4:L4)*4-4+1)

The ROWS function returns the number of rows within a specified range.
In this example...

ROWS(L$4:L4) --- returns 1

ROWS(L$4:L4)*4-4+1 --- also returns 1

This number is then used as an argument for the INDEX function and
returns the value from the first cell of the specified range, A4:A65536.

As the formula is copied/dragged to the next cell below, the formula
becomes...

=INDEX(A$4:A$65536,ROWS(L$4:L5)*4-4+1)

Here...

ROWS(L$4:L5) --- returns 2

ROWS(L$4:L5)*4-4+1 --- now returns 5

This time the value from the fifth cell of the specified range,
A4:A65536, is returned, and so on...

Hope this helps!

In article ,
Tim wrote:

Domenic,

That's brilliant! Thanks for that ... it works (but I've no idea how: what
is the Index formula telling Excel to do? If anyone can explain that I'd be
even happier).

Cheers,

Tim.