Reference horizontal data vertically and in sets of 3

duranimal86

New Member
Joined
Jul 24, 2019
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello, I am trying to find a way to reference rows of horizontal data with a formula to pull different columns in sets of 3 rows for each row of data. So each row of data would result in 3 corresponding formula rows with different columns referenced in each of the 3 rows. Then i would like to be able to have that set of 3 pattern copy down for multiple rows of horizontal data. I have been trying to make something work with INDEX and/or OFFSET, but haven't been able to get it to work. Below is example data to try and illustrate what i am looking for.

Horizontal Data to be referenced:
ID11A1B1C1D1E1F
ID22A2B2C2D2E2F
ID33A3B3C3D3E3F
ID44A4B4C4D4E4F


The result I am looking for:
ID11A(hardkeyed1)(hardkeyed2)1D
ID11A1B1C1E
ID11A1B1C1F
ID22A(hardkeyed1)(hardkeyed2)2D
ID22A2B2C2E
ID22A2B2C2F
ID33A(hardkeyed1)(hardkeyed2)3D
ID33A3B3C3E
ID33A3B3C3F
ID44A(hardkeyed1)(hardkeyed2)4D
ID44A4B4C4E
ID44A4B4C4F
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

I'm not exactly sure what the 'hardkeyed' cells are but perhaps you would be manually typing over the "?' results below?

21 07 14.xlsm
ABCDEFG
1ID11A1B1C1D1E1F
2ID22A2B2C2D2E2F
3ID33A3B3C3D3E3F
4ID44A4B4C4D4E4F
5
6ID11A??1D 
7ID11A1B1C 1E
8ID11A1B1C 1F
9ID22A??2D 
10ID22A2B2C 2E
11ID22A2B2C 2F
12ID33A??3D 
13ID33A3B3C 3E
14ID33A3B3C 3F
15ID44A??4D 
16ID44A4B4C 4E
17ID44A4B4C 4F
duranimal86
Cell Formulas
RangeFormula
A6:B17A6=INDEX(A$1:A$4,INT((ROWS(A$6:A6)+2)/3))
C6:D17C6=IF(MOD(ROWS(C$6:C6),3)=1,"?",INDEX(C$1:C$4,INT((ROWS(C$6:C6)+2)/3)))
E6:E17E6=IF(MOD(ROWS(E$6:E6),3)=1,INDEX(E$1:E$4,INT((ROWS(E$6:E6)+2)/3)),"")
F6:F17F6=IF(MOD(ROWS(F$6:F6),3)=1,"",INDEX(F$1:G$4,INT((ROWS(F$6:F6)+2)/3),1+(MOD(ROWS(F$6:F6),3)=0)))
 
Upvote 0
Solution
Wow, that worked perfectly! The "hardkeyed" were for constant numbers that will always be the same, so i was able to enter those in place of the "?" to get exactly what i needed. Thank you!
 
Upvote 0
You are welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,903
Messages
6,127,652
Members
449,395
Latest member
Perdi

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