+ Reply to Thread
Results 1 to 7 of 7

How to Merge Two Worksheet into One - Data One below the Other Using Macro

  1. #1
    Registered User
    Join Date
    05-09-2014
    Location
    India
    MS-Off Ver
    Excel 2010 on Windows 10
    Posts
    16

    How to Merge Two Worksheet into One - Data One below the Other Using Macro

    Hi All:

    Humbly requesting your support on "How to Merge Two Worksheet into One - Data One below the Other in Single Worksheet Using Macro"

    I am herewith attached two excel sheet named file1.xlsl and file2.xlsl

    file1.xlsl contains below records

    File Name Count
    File1 Apple 10
    File1 Mango 20


    file2.xlsl contains below records

    File Name Count
    File2 Orange 10
    File2 Lemon 20


    Expected Output After merging the Two Sheet File1 & File2 in the new Work Sheet as given below

    File Name Count
    File1 Apple 10
    File1 Mango 20
    File Name Count
    File2 Orange 10
    File2 Lemon 20


    Requesting for Macro to get the merged worksheet output on below the other. Pls. help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    Are the source files yet opened ?
    Or are they in the same folder than the code workbook ?

    That needs to be elaborate or you are very confident with your VBA skills to modify any code !
    Last edited by Marc L; 09-17-2019 at 06:51 AM. Reason: typo …

  3. #3
    Registered User
    Join Date
    05-09-2014
    Location
    India
    MS-Off Ver
    Excel 2010 on Windows 10
    Posts
    16

    Re: How to Merge Two Worksheet into One - Data One below the Other Using Macro

    HI: Answer to your query
    Are the source files yet opened ?

    I tried using below macro, but ther data are copied in separate worksheet not below one below the another in the same worksheet. Pls. help me with the Macro VB Code to achieve the excepted output

    Please Login or Register  to view this content.
    Last edited by ramkichn; 09-18-2019 at 01:33 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: How to Merge Two Worksheet into One - Data One below the Other Using Macro

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. 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, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    05-09-2014
    Location
    India
    MS-Off Ver
    Excel 2010 on Windows 10
    Posts
    16

    Re: How to Merge Two Worksheet into One - Data One below the Other Using Macro

    Hi: As mentioned, i put the code, in Code Tag, Pls. Help. Requesting for Excel worksheet merging solution one below the another

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: How to Merge Two Worksheet into One - Data One below the Other Using Macro


  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool

    ramkichn, according to your profile an Excel 2003 starter demonstration to paste to the result worksheet module :

    PHP Code: 
    Sub Demo0()
                
    Dim R&, V
        With Application
    .FileSearch
               
    .NewSearch
               
    .Filename "*.xlsx"
               
    .LookIn ThisWorkbook.Path
            
    If .Execute Then
                    Me
    .UsedRange.Clear
                    Application
    .ScreenUpdating False
                    R 
    1
                
    For Each V In .FoundFiles
                    With GetObject
    (V).Worksheets(1).UsedRange
                        
    .Copy Cells(R1)
                         
    + .Rows.Count
                        
    .Parent.Parent.Close False
                    End With
                Next
                    Application
    .ScreenUpdating True
            End 
    If
        
    End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 09-18-2019 at 05:17 AM.

+ 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. [SOLVED] Macro to Merge Different tabs into One worksheet
    By arpanpanchal in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 09-08-2015, 07:30 AM
  2. Macro to merge cells in worksheet
    By Prizanka in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2014, 11:30 AM
  3. Worksheet Merge Macro
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2010, 02:29 PM
  4. Worksheet Merge Macro
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2009, 02:45 PM
  5. Compare,Merge and sort data from differnet Excel worksheet in a new worksheet
    By supratik_pwc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2009, 08:23 AM
  6. Macro to merge 3 workbooks into 1 worksheet
    By Jen5309 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-09-2008, 03:18 PM
  7. Merge two worksheet into 3rd sheet (modifying a macro)
    By wali in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 06-05-2008, 02:58 AM

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