Taking columns from sheets

Serdarrk

New Member
Joined
Mar 7, 2018
Messages
36
Hello,

The following single file contains approximately 250 pages named by date. I need that opening new page in the file and take all pages' Y and Z columns starting from new page's D columns (I have to enter the names of the first three columns). I don't know it is possible but an other need when code copy and paste all Y and Z columns to new page, it must copy and paste name of every page to top of Y and Z columns (to 3.row). I hope I could tell. I will be very happy if you can help with this.


http://s7.dosya.tc/server3/9r93ou/01.02.2000-1.xls.html
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Your file is extremely large. Could you post a file that has only a few sample sheets? Also include a sheet that shows the how you want the data to look like after the macro is run.
 
Upvote 0
My antivirus software blocks the site when I try to download your file. Could you use dropbox.com or box.com?
 
Upvote 0
I noticed that columns Y and Z in the 3 source sheets do not contain data. Does that mean that you don't want to copy the data in the columns but you want to move the data? Also, could you explain in detail what you mean by
I have to enter the names of the first three columns
Please refer to specific cells, columns, rows and sheets.
 
Upvote 0
No, sorry. It is my mistake. I want to copy Y and Z columns.But also it can move because if I can succes to make it I will use only new page. I mean, I wil write to A,B and C columns names of share certificate's . Because of that I need to start from D column. And also I need to sort pages by date. As you can see in the file, pages names like 01.02.2000, 01.03.2000,01.04.2000. I mean pages sorted by first number. They would be like 01.02.2000 , 02.02.2000,03.02.200....01.12.2000,02.12.2000 etc. But I couldn't succes it also.
 
Upvote 0
Also, I don't want to interfere your business but if it is more easy for you, you can make like all Y columns to new page1, and all Z columns to new page2 from D column and with their names to 3rd row.
 
Upvote 0
Start by entering the names in A1, B1 and C1 in Sheet("Sayfa1"). Then try this macro.
Code:
Sub CopyCols()
    Application.ScreenUpdating = False
    Dim LastRow As Long
    Dim lColumn As Long
    Dim ws As Worksheet
    For Each ws In Sheets
        lColumn = Sheets("Sayfa1").Cells(1, Columns.Count).End(xlToLeft).Column
        If ws.Name <> "Sayfa1" Then
            Sheets("Sayfa1").Cells(1, lColumn + 1).Resize(, 2) = ws.Name
            LastRow = ws.Range("Y" & ws.Rows.Count).End(xlUp).Row
            ws.Range("Y4:Z" & LastRow).Copy
            Sheets("Sayfa1").Cells(3, lColumn + 1).PasteSpecial xlPasteValues
        End If
    Next ws
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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