Transpose data by modifying an old macro

AussieSteve

New Member
Joined
Dec 28, 2017
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hi guys.
Need a little help adding some code to a macro, that was an inquiry back in April this year on this forum. This the sample code.


Sub DoLoop()

Dim Rng As Range
Set Rng = Range("E1", Range("E" & Rows.Count).End(xlUp))
Dim c As Range
Set c = Rng.Find("MarketPlace", , , xlWhole, , xlNext, True, , False)
Application.ScreenUpdating = False
Do While Not c Is Nothing
'The below line of code, where it is to copy data,This is what I want to modify by adding transpose to the code, I cannot
'seem to get it to work.

c.Resize(, 3).Copy c.Offset(5, -3)
c.Resize(, 3).ClearContents
Set c = Rng.FindNext(c)
Loop
Application.ScreenUpdating = True
End Sub

As always any help is greatly appreciated.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try:
Code:
Sub DoLoop()
    Dim Rng As Range
    Set Rng = Range("E1", Range("E" & Rows.Count).End(xlUp))
    Dim c As Range
    Set c = Rng.Find("MarketPlace", , , xlWhole, , xlNext, True, , False)
    Application.ScreenUpdating = False
    Do While Not c Is Nothing
        c.Resize(, 3).Copy
        c.Offset(5, -3).PasteSpecial Transpose:=True
        c.Resize(, 3).ClearContents
        Set c = Rng.FindNext(c)
    Loop
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Reply to Mumps.
Thank you for your help, it works for me. I know that was simple for you, frustration told me to go here get it out of my head and move on.
Thanks again Steve.
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

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