Results 1 to 3 of 3

multiple work book sum

Threaded View

  1. #1
    Registered User
    Join Date
    01-18-2014
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    39

    multiple work book sum

    Sub SUM_WBs()
    
        Dim FileNameXls As Variant, i As Integer, wb As Workbook
        
        'ChDir = "C:\Temp\"      'Default directory
        
        FileNameXls = Application.GetOpenFilename(filefilter:="Excel Files, *.xl*", MultiSelect:=True)
        If Not IsArray(FileNameXls) Then Exit Sub    ' User cancelled
        
        Application.ScreenUpdating = False
        
        For i = LBound(FileNameXls) To UBound(FileNameXls)
        
            Set wb = Workbooks.Open(FileNameXls(i))
            wb.Sheets(1).Range("D4:S21").Copy
            ThisWorkbook.Sheets(1).Range("D4:S21").PasteSpecial Paste:=xlPasteValues, Operation:=xlAdd, SkipBlanks:=True, Transpose:=False
            Application.CutCopyMode = False
            wb.Close SaveChanges:=False
            
        Next i
        
        Application.ScreenUpdating = True
        
    End Sub

    So here is the situation copying workbook i have it but what i want is to fill in the blank.
    Exemple: workbook 1 has part numbers and workbook 2 the same and i want to sum them in workbook total. as you can see i can not only copy paste.Attachment 292807Attachment 292808Attachment 292809
    Attached Files Attached Files
    Last edited by K-Ching; 01-27-2014 at 01:49 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 11-16-2013, 12:06 PM
  2. Easy way to manage multiple Sheets on a work book
    By cfaristiz in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-31-2013, 12:12 AM
  3. Create PDF files from multiple work sheets in a single work book
    By erprasannaa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2012, 03:42 AM
  4. Replies: 2
    Last Post: 06-20-2012, 05:10 AM
  5. Replies: 2
    Last Post: 05-23-2006, 05:00 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