Results 1 to 7 of 7

How to transfer specific row of data from multiple workbooks to master workbook using VBA

Threaded View

rajeshntiwari How to transfer specific row... 10-07-2014, 05:01 AM
Naveed Raza Re: How to transfer specific... 10-07-2014, 05:20 AM
rajeshntiwari Re: How to transfer specific... 10-07-2014, 05:45 AM
Naveed Raza Re: How to transfer specific... 10-07-2014, 08:39 AM
rajeshntiwari Re: How to transfer specific... 10-07-2014, 05:44 AM
Naveed Raza Re: How to transfer specific... 10-08-2014, 03:01 AM
rajeshntiwari Re: How to transfer specific... 10-08-2014, 08:08 AM
  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    Karnatak, India
    MS-Off Ver
    Excel 2010
    Posts
    34

    How to transfer specific row of data from multiple workbooks to master workbook using VBA

    Hello,

    I have a VBA code which transfers mutiple rows of data from multiple workbooks to master workbook.

    Sub Compilation()
    
    Dim FolderPath As String, Filepath As String, Filename As String
    
    FolderPath = "H:\Test\"
    
    Filepath = FolderPath & "*.xls*"
    
    Filename = Dir(Filepath)
    
    Dim lastrow As Long, lastcolumn As Long
    
    Do While Filename <> ""
    
    Workbooks.Open (FolderPath & Filename)
    
    lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    
    lastcolumn = ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column
    
    Range(Cells(3, 1), Cells(lastrow, lastcolumn)).Copy
    
    Application.DisplayAlerts = False
    
    ActiveWorkbook.Close
    
    erow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    
    lastcolumn = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column
    
    ActiveSheet.Paste Destination:=Worksheets("Sheet1").Range(Cells(erow, 1), Cells(erow, lastcolumn))
    
    Filename = Dir
    
    Loop
    
    End Sub

    But I am looking out for a VBA code which should transfer only a specific row of data from multiple workbooks to master workbook using VBA. I want only the data which is present in ROW 3 to be transferred to master workbook.

    I have attached 4 samples of spread sheet for your reference. Can someone please HELP me on this!
    Last edited by rajeshntiwari; 10-07-2014 at 05:41 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Transfer Data from Multiple SharePoint Workbooks into Master Workbook Automatically
    By bjnockle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2014, 10:37 PM
  2. VBA to consolidate specific data from multiple workbooks to a master workbook
    By Blastaway12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-19-2014, 04:39 PM
  3. Replies: 12
    Last Post: 04-18-2014, 09:05 AM
  4. Export/ Retrieve specific data from multiple workbooks and Import into Master workbook
    By SerenitynWisdom in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-29-2013, 10:41 PM
  5. Help on macro to automatic transfer of data from multiple workbooks to master wkbk
    By ryuytsuken in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2013, 06:16 PM

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