impala_griffith
New Member
- Joined
- Jan 9, 2017
- Messages
- 3
Apologies if the title is confusing. Basically, I have a worksheet like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]eu[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="width: 568, align: left"]Aar[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]otn[/TD]
[TD]Aar ibaia[/TD]
[/TR]
[TR]
[TD]sp[/TD]
[TD]Aaar[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]eu[/TD]
[TD]Abidjan[/TD]
[/TR]
[TR]
[TD]dm[/TD]
[TD]abidjandar[/TD]
[/TR]
[TR]
[TD]sp[/TD]
[TD]Abidjan[/TD]
[/TR]
[TR]
[TD]en[/TD]
[TD]Abidjan[/TD]
[/TR]
</tbody>[/TABLE]
where each grouping of column A and B (delimited by blank cells) is one "entry", and the cells in column A denote the language of the corresponding cell in column B. So for example, in the first entry (or grouping of cells, from A1 to B3), the word in basque (eu) is "Aar", in otn it's "Aar ibaia", and in spanish (sp) it's "Aar". As you can see, not all grouping of cells contain the same languages (meaning each grouping of cells can have different number of rows), and even the ones who do may not be in the same order.
What I want to do is to somehow transpose the sheet like so:
[TABLE="width: 500"]
<tbody>[TR]
[TD]eu[/TD]
[TD]dm[/TD]
[TD]otn[/TD]
[TD]sp[/TD]
[TD]fr[/TD]
[TD]en[/TD]
[TD]sf[/TD]
[TD]loc[/TD]
[/TR]
[TR]
[TD]Aar[/TD]
[TD][/TD]
[TD]Aar ibaia[/TD]
[TD]Aar[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Abidjan[/TD]
[TD]abidjandar[/TD]
[TD][/TD]
[TD]Abidjan[/TD]
[TD][/TD]
[TD]Abidjan[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So essentially, every grouping of cells is transposed into one row, with the cells of each grouping's different translations put in the corresponding column.
I don't want to bother anyone with writing an entire VBA script for this (unless you like to do it), but could someone point me in the right direction of how to do this? I was thinking of something along the lines of the following:
1. Make a master sheet with the columns being eu, dm, otn, sp, etc.
2. Write a VBA script for the sheet of data, where you select all the data and it conducts an If-then statement where if cell A1 = "eu", copy/ paste cell B1 in Sheet2 cell A2 then go to the next cell, if A1 = "dm", copy/paste cell B1 in Sheet2 cell B2 then go to the next cell, .... if cell A1 is empty, start in the next row in Sheet 2 (new entry).
Thank you so much for all your help. If there's any other information you need, I'd be happy to provide it.
[TABLE="width: 500"]
<tbody>[TR]
[TD]eu[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="width: 568, align: left"]Aar[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]otn[/TD]
[TD]Aar ibaia[/TD]
[/TR]
[TR]
[TD]sp[/TD]
[TD]Aaar[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]eu[/TD]
[TD]Abidjan[/TD]
[/TR]
[TR]
[TD]dm[/TD]
[TD]abidjandar[/TD]
[/TR]
[TR]
[TD]sp[/TD]
[TD]Abidjan[/TD]
[/TR]
[TR]
[TD]en[/TD]
[TD]Abidjan[/TD]
[/TR]
</tbody>[/TABLE]
where each grouping of column A and B (delimited by blank cells) is one "entry", and the cells in column A denote the language of the corresponding cell in column B. So for example, in the first entry (or grouping of cells, from A1 to B3), the word in basque (eu) is "Aar", in otn it's "Aar ibaia", and in spanish (sp) it's "Aar". As you can see, not all grouping of cells contain the same languages (meaning each grouping of cells can have different number of rows), and even the ones who do may not be in the same order.
What I want to do is to somehow transpose the sheet like so:
[TABLE="width: 500"]
<tbody>[TR]
[TD]eu[/TD]
[TD]dm[/TD]
[TD]otn[/TD]
[TD]sp[/TD]
[TD]fr[/TD]
[TD]en[/TD]
[TD]sf[/TD]
[TD]loc[/TD]
[/TR]
[TR]
[TD]Aar[/TD]
[TD][/TD]
[TD]Aar ibaia[/TD]
[TD]Aar[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Abidjan[/TD]
[TD]abidjandar[/TD]
[TD][/TD]
[TD]Abidjan[/TD]
[TD][/TD]
[TD]Abidjan[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So essentially, every grouping of cells is transposed into one row, with the cells of each grouping's different translations put in the corresponding column.
I don't want to bother anyone with writing an entire VBA script for this (unless you like to do it), but could someone point me in the right direction of how to do this? I was thinking of something along the lines of the following:
1. Make a master sheet with the columns being eu, dm, otn, sp, etc.
2. Write a VBA script for the sheet of data, where you select all the data and it conducts an If-then statement where if cell A1 = "eu", copy/ paste cell B1 in Sheet2 cell A2 then go to the next cell, if A1 = "dm", copy/paste cell B1 in Sheet2 cell B2 then go to the next cell, .... if cell A1 is empty, start in the next row in Sheet 2 (new entry).
Thank you so much for all your help. If there's any other information you need, I'd be happy to provide it.