+ Reply to Thread
Results 1 to 8 of 8

Combine data in different sheets into one sheet

  1. #1
    Registered User
    Join Date
    12-05-2019
    Location
    USA
    MS-Off Ver
    2012
    Posts
    4

    Combine data in different sheets into one sheet

    Hi All,
    I have data different excel sheets and I would like to put all the data into one single sheet. I dont want the data to combine and fill the rows, which came up alot in google search. But rather I would like the data (regardless whether header is the same or different) to combine into different columns.

    For example:
    Sheet 1 - I have data in column A and B
    Sheet 2 - I have data in column A and B

    After combining, Sheet 1 data is in column A,B, and sheet 2 data is in column C, D.

    Is there anyway to modify this code to have the combined data to show across the columns? (this code combines the data and puts them in rows)

    --------------------------------------------------------
    Please Login or Register  to view this content.
    -------------------------------------------------------
    Thank you!
    Last edited by alansidman; 12-05-2019 at 12:30 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,403

    Re: Combine data in different sheets into one sheet

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    19,403

    Re: Combine data in different sheets into one sheet

    Please read the yellow banner at the top of this page and supply the needed information.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    3,673

    Re: Combine data in different sheets into one sheet

    Re: "Combine data in different sheets into one sheet"
    This implies one workbook and multiple sheets.

    Re: "I have data different excel sheets and I would like to put all the data into one single sheet"
    This implies one workbook and multiple sheets.

    However, your code shows opening different workbooks.

    Please explain properly what you want.

    If it is to combine all sheets from one workbook, why would you even mentioning the path of a workbook to open.

    Or don't you know the difference between sheets and workbooks?

  5. #5
    Registered User
    Join Date
    12-05-2019
    Location
    USA
    MS-Off Ver
    2012
    Posts
    4

    Re: Combine data in different sheets into one sheet

    Thank you for the clarification, i think i got it.

  6. #6
    Registered User
    Join Date
    12-05-2019
    Location
    USA
    MS-Off Ver
    2012
    Posts
    4

    Re: Combine data in different sheets into one sheet

    Hi Jol,

    My mistake, I posted the wrong code.

    this is exactly what I want:
    Sheet 1 - I have data in column A and B
    Sheet 2 - I have data in column A and B

    After combining, a new sheet will contain data from sheet 1 and sheet 2, and so on. Sheet 1 data is in column A,B, and sheet 2 data is in column C, D, and so on.

    The code I was using is this, which takes data from all sheets and puts them in rows format. Is there a way to modify the results mentioned above?
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    3,673

    Re: Combine data in different sheets into one sheet

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-05-2019
    Location
    USA
    MS-Off Ver
    2012
    Posts
    4

    Re: Combine data in different sheets into one sheet

    Thank you so much. The code works really nicely. Much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How do I combine 2 sheets of Data on a 3rd sheet in the same workbook
    By Tricky001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2016, 07:12 AM
  2. Combine data in multiple sheets to one sheet
    By RDevi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-10-2016, 10:44 AM
  3. Replies: 0
    Last Post: 10-12-2015, 10:02 AM
  4. Combine data from different sheets into a single sheet
    By cndesu in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-28-2012, 08:25 PM
  5. How do you combine data from 5 sheets to 1 sheet?
    By geng in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-09-2010, 08:33 PM
  6. Replies: 1
    Last Post: 06-27-2008, 10:14 PM
  7. [SOLVED] How do I combine data from several sheets into one main sheet?
    By Caren F in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-19-2006, 01:45 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