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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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