Рет қаралды 31,568
How to Combine Multiple Excel Files using VBA
In this video I show 3 examples of reading muliple Excel workbooks to one worksheet. The examples are:
1. Copy all the data.
2. Copy specific columns.
3. Return to the total amount for each item of the 3 files.
#excelvba #excelvbacopy #VBAMultipleFiles #ExcelMultipleFiles
SUBSCRIBE TO THE CHANNEL: bit.ly/36hpTCY
DOWNLOAD THE SOURCE CODE FOR THIS VIDEO: bit.ly/3ej9Lcg
RELATED RESOURCES:
(Blog Post)Excel VBA Copy - The Complete Guide to Copying Data: excelmacromastery.com/excel-v...
(Blog Post)Excel VBA Array - The Complete Guide: excelmacromastery.com/excel-v...
(Blog Post)Excel VBA Dictionary - A Complete Guide
excelmacromastery.com/vba-dic...
KZfaq PlayList: Excel VBA Dictionary: • Excel VBA Dictionary
RELATED TRAINING
The Excel VBA Handbook Course(TheExcelVBAHandbook.com)
Webinar Archives - 60+ Hours of VBA training(excelmacromastery.com/excel-v...)
Free Excel VBA Resources
Excel VBA Articles (excelmacromastery.com/vba-art...)
Useful VBA Shortcut Keys
========================
Debugging:
Compile the code: Alt + D + L OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)
Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R
Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)
Table of Contents:
00:00 - Introduction
01:11 - Code - return all the data
05:05 - Using Dir to get the files
06:12 - Reading the workbook data
08:18 - Writing the data to the worksheet
12:07 - IndividualColumns
14:20 - Totalling Values