americanuser2016
New Member
- Joined
- Oct 10, 2016
- Messages
- 3
Hi, I need help from an expert. I want to extend a range of numbers with text prefixes using a VBA. It's better if I use an example:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Input Column
[/TD]
[TD]Output Column
[/TD]
[/TR]
[TR]
[TD]R1,R2-5,R9,R10,R12-13
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]R1,R2,R3,R4,R5,R9,R10,R12,R13
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]CR1-3,CR99
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]CR1,CR2,CR3,CR99
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]D1-D3
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]D1,D2,D3
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]L1, L3,L4
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]L1,L3,L4
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
The text prefix can be any text and ranges from 1-4 letters, but the prefix is static for that row. There is also an undefined number of variables in the input column, there can be as many as 1000+ numbers. I separated the input and out put columns for clarity, but I actually want the output data to overwrite into the same column as the input.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Input Column
[/TD]
[TD]Output Column
[/TD]
[/TR]
[TR]
[TD]R1,R2-5,R9,R10,R12-13
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]R1,R2,R3,R4,R5,R9,R10,R12,R13
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]CR1-3,CR99
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]CR1,CR2,CR3,CR99
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]D1-D3
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]D1,D2,D3
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 145"]
<tbody>[TR]
[TD]L1, L3,L4
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 199"]
<tbody>[TR]
[TD]L1,L3,L4
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
The text prefix can be any text and ranges from 1-4 letters, but the prefix is static for that row. There is also an undefined number of variables in the input column, there can be as many as 1000+ numbers. I separated the input and out put columns for clarity, but I actually want the output data to overwrite into the same column as the input.