Count the number of row of data area (naming as "mydata"): =ROWS(mydata) [assume @ A6]
Count the number of column of data area (naming as "mydata"): =COLUMNS(mydata)ll [assume @ B6]
To get the row and column number matrix:
for ROW:
Any cell (Say A8): 1
Next cell (A9): =IF(COUNTIF($A$8:A8,$A$6)>=$B$6,"",IF(A8<$A$6,A8+1,1))
for COLUMN:
Any cell (Say B8): 1
Next cell (B9): =IF(A9<>"",IF(B8<$B$6,B8+1,1),"")
DRAG the formula as long as you wish
Now getting the data in one column where raw data are on same sheet @ start from C8
: =IF(A8="","",INDIRECT(ADDRESS(A8,B8)))
Now getting the data in one column where raw data are on different sheet which is named as "mydata" @ start from C8
:=IF(A8="","",INDEX(mydata,A8,B8))
Hope this will help. Please, correct if I am wrong
Example File:
https://docs.google.com/spreadsheet/ccc?key=0AlMNziTCmrQIdGp0R19QVnNTWGtSNjJnZVFOeFF4bmc