+ Reply to Thread
Results 1 to 10 of 10

summing values for all items across multiple workbooks

  1. #1
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    summing values for all items across multiple workbooks

    hello
    this file is a sample simple but my real file contains data at least 2000 rows for each file and I have five files in the same folder , the data and the files are increasable and the ranges not the same format so what I want macro search the data in all files based on topics headers and bring all the data and summing the values for each item and when summing the values should see in COLS A,B,C ,D together in all the files
    thanks
    Attached Files Attached Files
    Last edited by MKLAQ; 04-05-2021 at 08:06 AM.

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

    Arrow Re: summing values for all items across multiple workbooks


    Hi,

    with at least an attachment of two source files and a data filled attachment for the expected result workbook according to both sources files,
    all the necessary informations (where must be located the VBA procedure, 'same folder' is always the same or may change, …)
    anyway all important to know which will move your guessing thread to the thread expected whatever the forum …

  3. #3
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    Re: summing values for all items across multiple workbooks

    hi
    the directory should be "C:\Users\OSE\Desktop\asd"
    and I added two files

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: summing values for all items across multiple workbooks

    For the files uploaded.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    Re: summing values for all items across multiple workbooks

    @Jindon thanks but it shows this error "invalid use of null" in this line
    HTML Code: 
    what means?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: summing values for all items across multiple workbooks

    So apparently you are testing with the different files...

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    If this change does not work, need to see you file(s).

  7. #7
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    Re: summing values for all items across multiple workbooks

    @Jindon no theses are the same files , I've found my mistake because the file sum.xlsm also is existed in the same folder when I put in another place your code works excellently
    many thanks professional

  8. #8
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    Re: summing values for all items across multiple workbooks

    @Jindon after you if it's possible to mod the code each file contains multiple sheets so when summing across multiple workbooks then should summing the items for each sheet
    would you see the files and the result in file sum ?
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: summing values for all items across multiple workbooks

    Try change to
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    02-08-2021
    Location
    africa
    MS-Off Ver
    2016
    Posts
    395

    Re: summing values for all items across multiple workbooks

    it's very impressive ! thanks so much

+ 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. Conditional summing of items from multiple worksheets
    By trstew in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-12-2016, 08:20 AM
  2. Summing Multiple Values of List Items
    By Billy Corman in forum Excel General
    Replies: 2
    Last Post: 11-11-2015, 08:28 PM
  3. Summing items in multiple columns
    By lmccaigue in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2015, 12:35 PM
  4. Summing values of like items
    By phalcon45 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2013, 03:58 AM
  5. Summing Values in multiple workbooks
    By mstrlucky74 in forum Excel General
    Replies: 7
    Last Post: 11-17-2012, 06:57 PM
  6. Summing the values of the items of each of 3 different groups
    By Michael6 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-24-2011, 09:31 AM
  7. Replies: 1
    Last Post: 08-29-2010, 10:51 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