staggering rows

merlin777

Well-known Member
Joined
Aug 29, 2009
Messages
1,397
Office Version
  1. 2007
How can i stagger the contents of the following row using a formula? I want to stagger by different numbers of columns so row 2 might be identical data to row 1 but shifted right by a number of columns.

so for instance, if i stagger by 1 (always to the right) the first row will have 0 1 2 3 4 5 6 7 8 9, the next row will have 1 2 3 4 5 6 7 8 9 0, the third row will be 2 3 4 5 6 7 8 9 0 1 and so on
If I stagger by 2 it'll be 0123456789, 2345678901, 4567890123 and so on.

On a small scale I can do it by hand but this will be 365 columns and 10 rows and i want to try staggering by 0 to a max of 67 columns so id like a formula i can drag and fill!

Row 1 will always have the original data set.

I know there are functions which work with cell reference but i cant remember what they are called so its tricky to google them.

Thanks in advance!
 
In fact, here's a 365 version, I think will work:

Dynamic functions.xlsm
GHIJKLMNOPQRSTUVWXYZ
1ColumnsRowsOffsetabcdefghijklmnop
2167-3nopabcdefghijklm
3klmnopabcdefghij
4hijklmnopabcdefg
5efghijklmnopabcd
6bcdefghijklmnopa
7opabcdefghijklmn
8lmnopabcdefghijk
Sheet4
Cell Formulas
RangeFormula
K2:Z8K2=INDEX(K1:ZZ1,MOD(sequence(H2)*I2+sequence(,G2)-1,G2)+1)
Press CTRL+SHIFT+ENTER to enter array formulas.



In K2 only: =INDEX(K1:ZZ1,MOD(SEQUENCE(H2)*I2+SEQUENCE(,G2)-1,G2)+1)


And by all means, come back if you have more questions! ;)
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top