+ Reply to Thread
Results 1 to 8 of 8

extract information from various worksheet

Hybrid View

  1. #1
    Registered User
    Join Date
    05-22-2012
    Location
    Calgary, canada
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: extract information from various worksheet

    Hi,

    Please see attached. Below are the codes. they can also be found in the macro edit function.

    Sub Master()
    
        Dim ws As Worksheet
        Dim CellRef As Long
        Dim EmpName As String
    
    
    CellRef = 4
    
       
        For Each ws In ThisWorkbook.worksheets
        
               If ws.Name <> "Master" Then
          
                
                    ws.PivotTables("PivotTable1").TableRange2.Copy Destination:=worksheets("Master").Cells(CellRef, 1)
        
               
                    
                    EmpName = ws.range("C3").Copy worksheets("Master").cells(CellRef-1,1)
                    
                    CellRef = CellRef + ws.PivotTables("PivotTable1").TableRange2.Rows.Count + 5
                    
                    
            
            End If
        
        Next ws
    
    
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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