Transpose Data

Emanuele

New Member
Joined
Feb 25, 2020
Messages
14
Office Version
  1. 2016
Platform
  1. Windows
Hi guys, i would like to know how to add the transpose option to that part of code
Thx!

VBA Code:
            Set DestSh = ActiveWorkbook.Worksheets.Add
            Last = LastCol(DestSh)
            Set Copy1 = sh.Range("C10:AZ10")
                 With Copy1
                      DestSh.Cells(1, Last + 1).Resize(.Rows.Count, .Columns.Count).Value = .Value
                 End With
 
This line Last = LastCol(DestSh)needs to go before the loop as I showed.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You're welcome & thanks for the feedback
 
Upvote 0
Another thing, there is a way to add more data and create more than one adjacent column?
Furthermore it's possible to apply a string extract (for example, extract the first 4 and the last 4 characters and put them in different column)?
Thank you, and sorry for multiple question in a single thread, but vba is a completely new world for me
 
Upvote 0
As this is a different question, you will need to start a new thread, thanks
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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