Help making a Macro to transpose data

lwilt

Board Regular
Joined
May 16, 2013
Messages
187
I had to make changes to my previous data set and now my macro isn't working for it so I am hoping someone can help me make a new one. I have 3 columns and want to transpose what is in columns 2 and 3 so that each item now only shows up in one single row. The data currently looks like:

sku1QP
AF121C60
AK1802569
AK18025128.5
AK18025248
AK18025367.25
AB411FIR354
AB411FIR652
AB411FIR1250
AB411FIR2448
AE120AUS360
AE120AUS656.25
AE120AUS1253.13
AE120AUS2450
AY52115156
AY5219159
AY5216162
AY5213165
AY521
AY521
AY521
AY521
AY521
AY521
AY521
AY521
AY521
AY521
AY521
AY5223183.5
AY5226179
AY5229169
AY52215163
AY522
AY522
AY522

<colgroup><col><col><col></colgroup><tbody>
</tbody>


As you can see each item shows up multiple rows and I would like it to be in a singular row with the data going horizontal.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
if you have a macro create a new sheet or go to an empty sheet, copy the data, have your VBA macro do:

Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True

then have it copy it again from the new location and put it back into the old location

Make sense?
 
Upvote 0
will it matter that I removed one of the columns from the sheet that the original macro was using?
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top