Transpose every 7-th cell value from horizontal to vertical

strooman

Active Member
Joined
Oct 29, 2013
Messages
333
Office Version
  1. 2016
Platform
  1. Windows
I'm struggling a little bit with transposing (see example below). Thought I had a ssimple approach but that was definitely not a good approach ;o)) I tried:
=TRANSPOSE(MOD(COLUMN(C1:AL1)-4;7)=0)
With Control+Shift+Enter
I also experimented with INDEX combined with MOD to skip the blanks and only get the numbers. No succes.

Bottom-line, I want to transpose the values in row 1 from horizontal to vertical in column A. As you can see there are always six empty cells that I want to skip when I go from horizontal to vertical. Any Ideas would be very welcome?

TourPool2023.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
124270716076210
2242
370
471
560
676
7210
Kladblok
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
How about this?

=IF(MOD(COLUMN()-3,7)=0,INDEX($A$2:$A$7,COUNT($B$2:B2)+1),"")

Perhaps I explained myself badly. The original values, horizontal in row 1 (C1:AL1) have to be transposed to column A (A2:A7) vertical. Your formula just puts them in row 2 (C2:AL2) as far as i can see. That could be achieved with a simpel copy and paste but that is not what I'm looking for. Or am I missing something?
 
Upvote 0
I did it backwards.

GDO
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
124270716076210
2242242
37070
47171
56060
67676
7210210
Sheet7
Cell Formulas
RangeFormula
B2:B7B2=INDEX($C$1:$AL$1,,AGGREGATE(15,6,COLUMN($C$1:$AL$1)/($C$1:$AL$1<>""),ROW(B1))-COLUMN(C1)+1)
 
Upvote 0
Always looking for shorter formulas because the longer they get I lose track and it's more difficult to comprehend for me. I use a lot of F9 to understand what is going on. I fiddled around and came up with this formula which also seems to do the job.
FORMULA in A2 copy down:
Excel Formula:
=OFFSET($C$1,0,(ROWS($A$1:$A1)-1)*7)

Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
124270716076210
2242
370
471
560
676
7210
8
9
10
11
Data
Cell Formulas
RangeFormula
A2:A7A2=OFFSET($C$1,0,(ROWS($A$1:$A1)-1)*7)
 
Upvote 0
Always looking for shorter formulas because the longer they get I lose track and it's more difficult to comprehend for me.
I would be a little careful in choosing a formula simply because of its length. For example, the formula you have used in post #5 uses the volatile function OFFSET which may have a negative performance impact on your worksheet.
What about this equally simple, and non-volatile, alternative?

23 08 13.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKAL
124270716076210
2242
370
471
560
676
7210
Index
Cell Formulas
RangeFormula
A2:A7A2=INDEX(C$1:AL$1,7*ROWS(A$2:A2)-6)
 
Upvote 2
Solution

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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