VBA to add numbers in columns from various workbooks

  • Mark from South Africa. Trust you and the family are keeping safe during the COVID-19 situation.

    I have 1 master workbook, namely: “Example_FC 2020_Master” with 1 tab called “Master” and then I have 2 excl workbooks, namely:

    “Example_FC 2020_Retail_Mark” and “Example_FC 2020_Retail_Peter”, each with a master tab and then various customer name tabs.

    The worksheets consist of products.

    The idea is to forecast per customer, per product. In the master tab of “Example_FC 2020_Retail_Mark” and “Example_FC 2020_Retail_Peter”, I have used vlookup (very basic), to add all the columns from the various tabs in the same workbook, per product to give a grant total per month (all customers forecast quantities added together per product).

    I am sure it is earier to use VBA, than vlookup, but thats for another day.

    What I need is the following.....

    I would like to have a button in the “Example_FC 2020_Master” workbook, that I can press and what it will do is:

    Look (in a specific folder say on my desktop for example), at the 2 excl workbooks namely: “Example_FC 2020_Retail_Mark” and “Example_FC 2020_Retail_Peter”, in their master tabs and extract the quantities, per product and add them togther in the “Example_2020_Master” workbook.

    I will eventually have about 10 different workbooks with about 300 products, all exactly the same as “Example_FC 2020_Retail_Mark” and “Example_FC 2020_Retail_Peter” all consolidating to the “Example_FC 2020_Master”

    Can someone help me with the code if possible? Example attached

  • NewbieMark

    Changed the title of the thread from “VBA to add columns from various workbooks” to “VBA to add numbers in columns from various workbooks”.
  • Thank you p45cal

    BTW, Excelforum.com wont allow me to post links. Error message "You are not allowed to post any kinds of links, images or videos until you post a few times."

  • vbaexpress.com is down at the moment; I'll try to post something there tomorrow for you to try…