+ Reply to Thread
Results 1 to 6 of 6

Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet

  1. #1
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2016
    Posts
    341

    Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet

    Hi

    I want to copy multiple cells (ex. B2, B3, F2, D9 to D17) from all the sheets and paste them in Master Sheet (as shown in attached test file).

    Any help in realizing this would be great as I am in dire need to consolidate more than 500 sheets.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet

    The attached works on the sample provided.

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

    Cool Hi ! Another way …


    According to explanation & attachment as a beginner starter to paste to the worksheet Master module :

    PHP Code: 
    Sub Demo1()
        
    Dim VU&, R&, N&
            
    = [B2:D2].Value
            Me
    .UsedRange.Clear
            Application
    .ScreenUpdating False
            
    [B2:D2].Value V
            V 
    Application.Transpose(Worksheets(1).Range("B9"Worksheets(1).[B8].End(xlDown)))
            
    UBound(V)
            [
    E2].Resize(, U).Value V
            R 
    2
        
    For 1 To Me.Index 1
            With Worksheets
    (N)
                
    Application.Transpose(.[D6].Resize(3))
                
    V(1) = .[B3].Value
                V
    (2) = .[B2].Value
                V
    (3) = .[F2].Value
            End With
                R 
    1
                Cells
    (R2).Resize(, 3).Value V
        Next
            Cells
    (14).Value "Total"
            
    Cells(15).Resize(, U).Formula "=SUM(E3:E" ")"
            
    Application.ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  4. #4
    Forum Contributor
    Join Date
    09-16-2014
    Location
    Hyderabad
    MS-Off Ver
    MS Office 2016
    Posts
    341

    Re: Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet

    @AB33, thanks for the code, it worked like charm.

    Just a small change required.
    Is there anyway, I can add a snippet in the code to exclude few sheets like "Data", "Information", "Form". I mean, instead of lopping all the sheets, code needs to exclude few sheets.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet

    Yes, change this line of code

    Please Login or Register  to view this content.
    INTO

    Please Login or Register  to view this content.

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

    Re: Copy Multiple Cells from Multiple Sheets and paste them in Master Sheet


    According to this new information my revamped beginner starter to paste to the worksheet Master module :

    PHP Code: 
    Sub Demo1()
        
    Dim VWU&, R&, N&
            
    = [B2:D2].Value
            Me
    .UsedRange.Clear
            Application
    .ScreenUpdating False
            
    [B2:D2].Value V
            W 
    = [{"Data","Information","Form"}]
            
    Application.Transpose(Worksheets(1).Range("B9"Worksheets(1).[B8].End(xlDown)))
            
    UBound(V)
            [
    E2].Resize(, U).Value V
            R 
    2
        
    For 1 To Me.Index 1
            With Worksheets
    (N)
                If 
    IsError(Application.Match(.NameW0)) Then
                    V 
    Application.Transpose(.[D6].Resize(3))
                    
    V(1) = .[B3].Value
                    V
    (2) = .[B2].Value
                    V
    (3) = .[F2].Value
                    R 
    1
                    Cells
    (R2).Resize(, 3).Value V
                End 
    If
            
    End With
        Next
            Cells
    (14).Value "Total"
            
    Cells(15).Resize(, U).Formula "=SUM(E3:E" ")"
            
    Application.ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 07-13-2018 at 07:36 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. Copy Data from multiple sheets based on criteria in a column and paste to master log.
    By Jsonic5280 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2016, 03:55 PM
  2. copy and past cell on multiple sheets into master sheet
    By asqw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2014, 07:09 AM
  3. Insert and Copy to Multiple Sheets from a Master Sheet
    By mja05d in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-21-2013, 11:52 AM
  4. [SOLVED] Copy Data From Master Sheet to Multiple Sheets
    By dmmr in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-06-2013, 11:28 AM
  5. Need cut and paste data from multiple sheets to one master sheet
    By cokillerliu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2013, 06:41 PM
  6. [SOLVED] Macro to copy data from multiple sheets to one (new) master sheet
    By nhtodd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2012, 02:30 AM
  7. copy cell from multiple sheets to master sheet
    By ciprian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2011, 08:07 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