Transpose Question

kazbear

New Member
Joined
Dec 16, 2002
Messages
42
Office Version
  1. 365
Platform
  1. Windows
Hello!
I am using the desktop version of Excel as part of the 365 bundle, all up to date on Windows 10.

My goal is to create a template I can use for adding closed captions to a video, and in this case, I want my final output to be an .srt file, so the format has to be specific. Like this:
1
00:00:00,000 --> 00:00:05,000
Hola, soy Tania. Bienvenida a la Clínica de Planificación
2
00:00:05,000 --> 00:00:10,000
Familiar de la calle Las Flores Sur. Me alegro de

My template has rows that have been set for 5-second intervals between captions (Again, a template to get started), and everything is combined into three cells. Then I transpose those cells to give me the format you see above.
So the part of the sheet I am transposing looks like this:
1​
00:00:00,000 --> 00:00:05,000Hola, soy Tania. Bienvenida a la Clínica de Planificación
2​
00:00:05,000 --> 00:00:10,000Familiar de la calle Las Flores Sur. Me alegro de
3​
00:00:10,000 --> 00:00:15,000que esté aquí para observar la intervención “De mujer
4​
00:00:15,000 --> 00:00:20,000a mujer: toma el control de tu salud” en acción. Este

and I am using =TRANSPOSE(H3:J3) to give me the format that I need.
My hope was that I could grab the new transpose cells, and drag them down to auto-fill, but of course, it skips to every 4th row.

1
00:00:00,000 --> 00:00:05,000
Hola, soy Tania. Bienvenida a la Clínica de Planificación
5
00:00:20,000 --> 00:00:25,000
curso será útil para las proveedoras que trabajan
9
00:00:40,000 --> 00:00:45,000
de tu salud” o “De Mujer a Mujer”, como la llamaremos

Looking for any direction someone might have to make sure it grabs each row.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
If you table is starting in A2:
Excel Formula:
=TOCOL(HSTACK(A2:C5,CHOOSE(SEQUENCE(ROWS(A2:C5),1,1,0),"")))

This is assuming you want a space between each set. If not, it's smaller. You can also drop the last space at the end if you need that.
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I like JamesCanale version

If you don't have 365 and your data is in A2:C5
=INDEX($A$2:$C$5,CEILING((ROW()-1)/3,1),ROW()-1-(CEILING((ROW()-1)/3,1)*3-3))
 
Upvote 0
Another option if you have 365 with the latest functions
Fluff.xlsm
ABHIJ
1
21100:00:00,000 --> 00:00:05,000Hola, soy Tania. Bienvenida a la Clínica de Planificación
300:00:00,000 --> 00:00:05,000200:00:05,000 --> 00:00:10,000Familiar de la calle Las Flores Sur. Me alegro de
4Hola, soy Tania. Bienvenida a la Clínica de Planificación300:00:10,000 --> 00:00:15,000que esté aquí para observar la intervención “De mujer
5400:00:15,000 --> 00:00:20,000a mujer: toma el control de tu salud” en acción. Este
62
700:00:05,000 --> 00:00:10,000
8Familiar de la calle Las Flores Sur. Me alegro de
9
103
1100:00:10,000 --> 00:00:15,000
12que esté aquí para observar la intervención “De mujer
13
144
1500:00:15,000 --> 00:00:20,000
16a mujer: toma el control de tu salud” en acción. Este
17
18
Temp
Cell Formulas
RangeFormula
A2:A16A2=DROP(TOCOL(EXPAND(H2:J5,,4,"")),-1)
Dynamic array formulas.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Thank you! Updated.
(Though I did start my post with my version and platform...) :)
 
Upvote 0
If you table is starting in A2:
Excel Formula:
=TOCOL(HSTACK(A2:C5,CHOOSE(SEQUENCE(ROWS(A2:C5),1,1,0),"")))

This is assuming you want a space between each set. If not, it's smaller. You can also drop the last space at the end if you need that.
Yes, this is a great solution. Looks like I have a new function to learn about.
Thank you!
 
Upvote 0
Another option if you have 365 with the latest functions
Fluff.xlsm
ABHIJ
1
21100:00:00,000 --> 00:00:05,000Hola, soy Tania. Bienvenida a la Clínica de Planificación
300:00:00,000 --> 00:00:05,000200:00:05,000 --> 00:00:10,000Familiar de la calle Las Flores Sur. Me alegro de
4Hola, soy Tania. Bienvenida a la Clínica de Planificación300:00:10,000 --> 00:00:15,000que esté aquí para observar la intervención “De mujer
5400:00:15,000 --> 00:00:20,000a mujer: toma el control de tu salud” en acción. Este
62
700:00:05,000 --> 00:00:10,000
8Familiar de la calle Las Flores Sur. Me alegro de
9
103
1100:00:10,000 --> 00:00:15,000
12que esté aquí para observar la intervención “De mujer
13
144
1500:00:15,000 --> 00:00:20,000
16a mujer: toma el control de tu salud” en acción. Este
17
18
Temp
Cell Formulas
RangeFormula
A2:A16A2=DROP(TOCOL(EXPAND(H2:J5,,4,"")),-1)
Dynamic array formulas.
Thank you, I'm going to try this as well.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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