andrewgroom
New Member
- Joined
- May 7, 2009
- Messages
- 21
Hi,
I have tried to find an answer to this but to no avail.
I am trying to condense a full list of values into ranges (and there isn't necessarily a pattern). E.g.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column 1[/TD]
[TD]Column 2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Would become:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column 1[/TD]
[TD]Column 2[/TD]
[/TR]
[TR]
[TD]1-3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4-5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]6-8[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Thank you in advance!
Cheers,
A
I have tried to find an answer to this but to no avail.
I am trying to condense a full list of values into ranges (and there isn't necessarily a pattern). E.g.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column 1[/TD]
[TD]Column 2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Would become:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column 1[/TD]
[TD]Column 2[/TD]
[/TR]
[TR]
[TD]1-3[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4-5[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]6-8[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
Thank you in advance!
Cheers,
A