Help modifying a macro

lwilt

Board Regular
Joined
May 16, 2013
Messages
187
I'm trying to modify a macro for transposing some data and it's not working. Here is the original macro:


Sub TransposeQandP()
Dim X As Long, Ar As Range
With Range("A1:A" & Cells(Rows.Count, "B").End(xlUp).Row).SpecialCells(xlBlanks)
For Each Ar In .Areas
For X = 1 To Ar.Count
Ar(1).Offset(-1, Cells(Ar(1).Offset(-1).Row, Columns.Count).End(xlToLeft). _
Column).Resize(, 2).Value = Ar(1).Offset(X - 1, 2).Resize(, 2).Value
Next
Next
.EntireRow.Delete
End With
End Sub

Now my data set is only 2 columns where I need to transpose what is in column B so that each different entry in column A will have every entry attached to in in column B all being in one single row.

please help...thank you
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
An example of input and desired output?
 
Upvote 0
Now my data set is only 2 columns where I need to transpose what is in column B so that each different entry in column A will have every entry attached to in in column B all being in one single row.
 
Upvote 0

Forum statistics

Threads
1,222,313
Messages
6,165,293
Members
451,950
Latest member
WH2000

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