Dear All,
I wonder if anybody can help. We are getting a pretty difficult output from one of our surveys.
It looks like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]No[/TD]
[TD]Detail[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]12[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]12[/TD]
[TD]16[/TD]
[TD]0.50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12346[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]11[/TD]
[TD]20[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Problem we have is that the columns can go on to a different depth in each line entry. So line 1 could have 49 columns and line 2 could have 70 columns Ideally we would like the output to be like this :
[TABLE="width: 500"]
<tbody>[TR]
[TD]NO[/TD]
[TD]Detail[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]12[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12345[/TD]
[TD]5[/TD]
[TD]12[/TD]
[TD]16[/TD]
[TD]0.50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12346[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12346[/TD]
[TD]7[/TD]
[TD]11[/TD]
[TD]20[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So I would like to transpond every 7 columns into rows. I have done so but only per each line and I had to find out where it ends as well as insert more lines (yes I am not great with formulas I am afraid). I was wondering if any of you would know about a better and smarter way of doing this.
Thank you.
I wonder if anybody can help. We are getting a pretty difficult output from one of our surveys.
It looks like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]No[/TD]
[TD]Detail[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]12[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]12[/TD]
[TD]16[/TD]
[TD]0.50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12346[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]11[/TD]
[TD]20[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Problem we have is that the columns can go on to a different depth in each line entry. So line 1 could have 49 columns and line 2 could have 70 columns Ideally we would like the output to be like this :
[TABLE="width: 500"]
<tbody>[TR]
[TD]NO[/TD]
[TD]Detail[/TD]
[TD]ON[/TD]
[TD]OFF[/TD]
[TD]T[/TD]
[TD]Pay[/TD]
[TD]P[/TD]
[TD]D[/TD]
[TD]Comment[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12345[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]12[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12345[/TD]
[TD]5[/TD]
[TD]12[/TD]
[TD]16[/TD]
[TD]0.50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12346[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]10[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]12346[/TD]
[TD]7[/TD]
[TD]11[/TD]
[TD]20[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So I would like to transpond every 7 columns into rows. I have done so but only per each line and I had to find out where it ends as well as insert more lines (yes I am not great with formulas I am afraid). I was wondering if any of you would know about a better and smarter way of doing this.
Thank you.