The Great SrH
Board Regular
- Joined
- Jan 16, 2015
- Messages
- 179
Hi all,
I'm really sorry as I'm struggling to even describe what I'm asking help for here.
I basically have a list of 30,000 rows of data where Column C is the unique number relating to a customer and Column D is a product they hold.
I'm looking for some code to do something like run down the list and if Column C exists, move the information into the next available column after Column D.
For the sake of an example, I'm using Column A as the Unique Number and Column B is the product.
Current List:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Row
[/TD]
[TD]Column A
[/TD]
[TD]Column B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Unique Number
[/TD]
[TD]Product
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]12345
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]7210
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]12345
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1234
[/TD]
[TD]Grape
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]7210
[/TD]
[TD]Berry
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]7210
[/TD]
[TD]Melon
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]12345
[/TD]
[TD]Grape
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]12345
[/TD]
[TD]Melon
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]7210
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]5065
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]13
[/TD]
[TD]5792
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]14
[/TD]
[TD]5792
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]8090
[/TD]
[TD]Grape
[/TD]
[/TR]
</tbody>[/TABLE]
Desired Output:
[TABLE="class: grid, width: 750, align: center"]
<tbody>[TR]
[TD]Row
[/TD]
[TD]Column A
[/TD]
[TD]Column B
[/TD]
[TD]Column C
[/TD]
[TD]Column D
[/TD]
[TD]Column E
[/TD]
[TD]Column F
[/TD]
[TD]Column G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Unique Number
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345
[/TD]
[TD]Banana
[/TD]
[TD]Pear
[/TD]
[TD]Apple
[/TD]
[TD]Grape
[/TD]
[TD]Melon
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]7210
[/TD]
[TD]Apple
[/TD]
[TD]Berry
[/TD]
[TD]Melon
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1234
[/TD]
[TD]Grape
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]5065
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]5792
[/TD]
[TD]Apple
[/TD]
[TD]Pear
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]8090
[/TD]
[TD]Grape
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm really sorry as I'm struggling to even describe what I'm asking help for here.
I basically have a list of 30,000 rows of data where Column C is the unique number relating to a customer and Column D is a product they hold.
I'm looking for some code to do something like run down the list and if Column C exists, move the information into the next available column after Column D.
For the sake of an example, I'm using Column A as the Unique Number and Column B is the product.
Current List:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Row
[/TD]
[TD]Column A
[/TD]
[TD]Column B
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Unique Number
[/TD]
[TD]Product
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]12345
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]7210
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]12345
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]1234
[/TD]
[TD]Grape
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]7210
[/TD]
[TD]Berry
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]7210
[/TD]
[TD]Melon
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD]12345
[/TD]
[TD]Grape
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]12345
[/TD]
[TD]Melon
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]7210
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]5065
[/TD]
[TD]Banana
[/TD]
[/TR]
[TR]
[TD]13
[/TD]
[TD]5792
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]14
[/TD]
[TD]5792
[/TD]
[TD]Pear
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD]8090
[/TD]
[TD]Grape
[/TD]
[/TR]
</tbody>[/TABLE]
Desired Output:
[TABLE="class: grid, width: 750, align: center"]
<tbody>[TR]
[TD]Row
[/TD]
[TD]Column A
[/TD]
[TD]Column B
[/TD]
[TD]Column C
[/TD]
[TD]Column D
[/TD]
[TD]Column E
[/TD]
[TD]Column F
[/TD]
[TD]Column G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Unique Number
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[TD]Product
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345
[/TD]
[TD]Banana
[/TD]
[TD]Pear
[/TD]
[TD]Apple
[/TD]
[TD]Grape
[/TD]
[TD]Melon
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]7210
[/TD]
[TD]Apple
[/TD]
[TD]Berry
[/TD]
[TD]Melon
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]1234
[/TD]
[TD]Grape
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]5065
[/TD]
[TD]Banana
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]5792
[/TD]
[TD]Apple
[/TD]
[TD]Pear
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]8090
[/TD]
[TD]Grape
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]