Forum Discussion
FILL SERIES BASED ON ABOVE FORMULA
- Nov 27, 2023
MFY92 For older versions of Excel, you could try something along these lines:
=IF(ROW()-ROW($A$8)>ROWS($A$1:$L$7)*COLUMNS($A$1:$L$7), "< End of data >", INDEX($A$1:$L$7, MOD(ROW()-ROW($A$8)-1, ROWS($A$1:$L$7))+1, ROUNDUP((ROW()-ROW($A$8))/ROWS($A$1:$L$7), 0)))
Where:
- $A$1:$L$7 is the data range
- ROWS($A$1:$L$7) is the height of the data range
- COLUMNS($A$1:$L$7) is the width of the data range
- ROW()-ROW($A$8) is the current output row
- ROWS($A$1:$L$7)*COLUMNS($A$1:$L$7) is the total number of output rows
In this example, the above formula was entered in cell A9 (the first output row) and dragged/copied down until it returned "< End of data >".
Please see the attached workbook, where I've broken down the calculations into steps (on the Step by Step worksheet)...
EDIT: the single-formula method shown above is an amalgamation of the step-by-step method demonstrated in the attached workbook, but can also be simplified using the IFERROR function as follows:
=IFERROR(INDEX($A$1:$L$7, MOD(ROW()-ROW($A$8)-1, ROWS($A$1:$L$7))+1, ROUNDUP((ROW()-ROW($A$8))/ROWS($A$1:$L$7), 0)), "< End of data >")
MFY92 For older versions of Excel, you could try something along these lines:
=IF(ROW()-ROW($A$8)>ROWS($A$1:$L$7)*COLUMNS($A$1:$L$7), "< End of data >", INDEX($A$1:$L$7, MOD(ROW()-ROW($A$8)-1, ROWS($A$1:$L$7))+1, ROUNDUP((ROW()-ROW($A$8))/ROWS($A$1:$L$7), 0)))
Where:
- $A$1:$L$7 is the data range
- ROWS($A$1:$L$7) is the height of the data range
- COLUMNS($A$1:$L$7) is the width of the data range
- ROW()-ROW($A$8) is the current output row
- ROWS($A$1:$L$7)*COLUMNS($A$1:$L$7) is the total number of output rows
In this example, the above formula was entered in cell A9 (the first output row) and dragged/copied down until it returned "< End of data >".
Please see the attached workbook, where I've broken down the calculations into steps (on the Step by Step worksheet)...
EDIT: the single-formula method shown above is an amalgamation of the step-by-step method demonstrated in the attached workbook, but can also be simplified using the IFERROR function as follows:
=IFERROR(INDEX($A$1:$L$7, MOD(ROW()-ROW($A$8)-1, ROWS($A$1:$L$7))+1, ROUNDUP((ROW()-ROW($A$8))/ROWS($A$1:$L$7), 0)), "< End of data >")