Referencing data from a row in a grid

Josiah

Board Regular
Joined
Apr 10, 2008
Messages
178
I have a row of data that is 128 columns wide (AZ5:FW5). I want to use that data in a grid 4 columns by 32 rows so that:

H5=AZ5, I5=BA5, J5=BB5, K5=BC5
H6=BD5, I6=BE5, J6=BF5, K6=BG5
...
...
...
and so on all the way down to H36 - K36


Is there a quick and easy way to do this without copying the data row by row?


(I probably could have already had it done by the time I typed this but it's the principle of the matter! :) )
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Josiah,

In H5 use... =OFFSET(AZ$5,0,(ROWS(H$5:H5)-1)*4)

Drag to K5 then drag all 4 down to row 36

If you then want hard values rather than formulas in H5:K36 then select H5:K36 and do Copy / Paste Special ? Values

Hope that helps.
 
Upvote 0
Josiah,

In H5 use... =OFFSET(AZ$5,0,(ROWS(H$5:H5)-1)*4)

Drag to K5 then drag all 4 down to row 36

If you then want hard values rather than formulas in H5:K36 then select H5:K36 and do Copy / Paste Special ? Values

Hope that helps.


Thanks! That's perfect just like it is!
 
Upvote 0
You are welcome.

It probably does not matter in your instance but you could use the below alternative if there was need to avoid using the 'volatile' OFFSET function.

=INDEX($AZ$5:$FW$5,1,((ROWS(H$5:H5)-1)*4)+COLUMNS($H5:H5))
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

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