Hello,
I am going to be importing a CSV file into a sheet weekly and need the column to line up properly. The Comma Seperated list I am importing does not account for spaces I need for the excel sheet. I made a dummy table below. Every person is ordering a shirt, a hat, shoes, or any combination of the three. To the right is how many they are ordering. I need to run a macro to shift cells from the shirt column if they don't equal shirt, while also keeping the quantities. Basically I want the first table to turn into the 2nd table by running a VBA. The order will always be SHIRT - HAT - SHOES
[TABLE="width: 500"]
<tbody>[TR]
[TD]NAME
[/TD]
[TD]SHIRT?
[/TD]
[TD]QTY
[/TD]
[TD]HAT?
[/TD]
[TD]QTY
[/TD]
[TD]SHOES?
[/TD]
[TD]QTY
[/TD]
[/TR]
[TR]
[TD]kyle
[/TD]
[TD]Shirt
[/TD]
[TD]1
[/TD]
[TD]Shoes
[/TD]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]john
[/TD]
[TD]Shoes
[/TD]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]jack
[/TD]
[TD]Shirt
[/TD]
[TD]3
[/TD]
[TD]Hat
[/TD]
[TD]1
[/TD]
[TD]Shoes
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]kevin
[/TD]
[TD]Hat
[/TD]
[TD]2
[/TD]
[TD]Shoes
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]NAME
[/TD]
[TD]SHIRT?
[/TD]
[TD]QTY
[/TD]
[TD]HAT?
[/TD]
[TD]QTY?
[/TD]
[TD]SHOES?
[/TD]
[TD]QTY
[/TD]
[/TR]
[TR]
[TD]kyle
[/TD]
[TD]Shirt
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shoes
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]john
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Shoes
[/TD]
[TD]5
[/TD]
[/TR]
[TR]
[TD]jack
[/TD]
[TD]Shirt
[/TD]
[TD]3
[/TD]
[TD]Hat
[/TD]
[TD][/TD]
[TD]Shoes
[/TD]
[TD]3
[/TD]
[/TR]
[TR]
[TD]kevin
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Hat
[/TD]
[TD]2
[/TD]
[TD]Shoes
[/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]
Anything Helps
THANK YOU!!!
I am going to be importing a CSV file into a sheet weekly and need the column to line up properly. The Comma Seperated list I am importing does not account for spaces I need for the excel sheet. I made a dummy table below. Every person is ordering a shirt, a hat, shoes, or any combination of the three. To the right is how many they are ordering. I need to run a macro to shift cells from the shirt column if they don't equal shirt, while also keeping the quantities. Basically I want the first table to turn into the 2nd table by running a VBA. The order will always be SHIRT - HAT - SHOES
[TABLE="width: 500"]
<tbody>[TR]
[TD]NAME
[/TD]
[TD]SHIRT?
[/TD]
[TD]QTY
[/TD]
[TD]HAT?
[/TD]
[TD]QTY
[/TD]
[TD]SHOES?
[/TD]
[TD]QTY
[/TD]
[/TR]
[TR]
[TD]kyle
[/TD]
[TD]Shirt
[/TD]
[TD]1
[/TD]
[TD]Shoes
[/TD]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]john
[/TD]
[TD]Shoes
[/TD]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]jack
[/TD]
[TD]Shirt
[/TD]
[TD]3
[/TD]
[TD]Hat
[/TD]
[TD]1
[/TD]
[TD]Shoes
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]kevin
[/TD]
[TD]Hat
[/TD]
[TD]2
[/TD]
[TD]Shoes
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]NAME
[/TD]
[TD]SHIRT?
[/TD]
[TD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