Results 1 to 8 of 8

VBA code that copies different sheets and paste in one sheet, column by column

Threaded View

leewk114 VBA code that copies... 08-06-2019, 04:45 PM
MrGes Re: VBA code that copies... 08-06-2019, 04:54 PM
leewk114 Re: VBA code that copies... 08-06-2019, 05:07 PM
MrGes Re: VBA code that copies... 08-06-2019, 05:32 PM
leewk114 Re: VBA code that copies... 08-06-2019, 05:56 PM
Marc L Hi ! Try this ! 08-06-2019, 06:59 PM
leewk114 Re: Hi ! Try this ! 08-06-2019, 07:11 PM
Marc L Thanks for the rep' ! I... 08-06-2019, 07:34 PM
  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Unhappy VBA code that copies different sheets and paste in one sheet, column by column

    I am trying to make a code that brings data in multiple sheets and align in one sheet column by column

    This code I have, brings the data and stack it vertically one sheet on top of another sheet

    but I want it to stack horizontally like sheet1 data will be in column A, B, C and and sheet2 data will be in column D, E, F.

    data is already aligned by column i just want the program to stack column by column instead of row by row

    I thought changing last line: Range("A65536").End (xlUp)(2) ---> Range("XFD").End (xlleft)(2)

    but it does not work, here is my code below

    Sub combinesheets()
    
    Dim J As Integer
    
    
    On Error Resume Next
    
    
    Sheets(1).Select
    
    
    Worksheets.Add
    
    
    Sheets(1).Name = "Combined"
    
    
    Sheets(2).Activate
    
    
    Range("A1").EntireRow.Select
    
    
    Selection.Copy Destination:=Sheets(1).Range("A1")
    
    
    For J = 2 To Sheets.Count
    
    
    Sheets(J).Activate
    
    
    Range("A1").Select
    
    
    Selection.CurrentRegion.Select
    
    
    Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
    
    
    Next
    
    
    End Sub
    Attached Files Attached Files
    Last edited by leewk114; 08-06-2019 at 05:07 PM. Reason: attaching examples

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copies of all the sheets if column A contains ...
    By Berna11 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 12-19-2016, 04:25 PM
  2. VBA COde For copy and paste B column of every sheets to new workbook in one sheet
    By Chetan_raghu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2016, 02:22 PM
  3. Replies: 1
    Last Post: 05-30-2015, 04:38 PM
  4. [SOLVED] Need to modify VBA Code that copies multiple sheets to a master sheet
    By AXGirl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-02-2014, 04:37 PM
  5. [SOLVED] VBA code to combine data from two different sheet columns and paste new sheet and column?
    By Chris* in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2014, 03:15 AM
  6. [SOLVED] need macro that prints sheets listed in column a and the # of copies i want in column b
    By ffxmp0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2012, 11:22 PM
  7. Macro that copies from multiple sheets to one column
    By favoritepsalm1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2007, 02:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1