Excel VBA Macro: Extract Data from All Files in a (User Selected) Folder
greggowaffles
View ChannelAbout
My mission is to create tutorials that are fun, easy to understand, and connected to real world scenarios.
Latest Posts
Video Description
💼 Hire Me for Excel VBA Automation Need help automating your Excel workflows? I specialize in building custom Excel VBA solutions to save you time and eliminate repetitive tasks. 👉 https://www.upwork.com/freelancers/~013bd05e311ebf4a2c Excel VBA Macro: Extract Data from All Files in a (User Selected) Folder 💥Subscribe: https://youtube.com/@greggowaffles Code: Sub grab_data_from_files_in_folder() Dim myPath As String Dim myFile As String Dim FldrPicker As FileDialog Dim sh As Worksheet Dim i As Integer Application.ScreenUpdating = False Set sh = ThisWorkbook.Sheets("Team Summary") Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker) With FldrPicker .Title = "Please Select Folder" .AllowMultiSelect = False .ButtonName = "Confirm!!" If .Show = -1 Then myPath = .SelectedItems(1) & "\" Else End End If End With With sh .Cells.ClearContents .Cells(1, 1) = "Team Name" .Cells(1, 1).Font.Size = 14 .Cells(1, 1).Font.Bold = True .Cells(1, 2) = "Total Sales" .Cells(1, 2).Font.Size = 14 .Cells(1, 2).Font.Bold = True End With myFile = Dir(myPath) i = 2 Do While myFile <> "" Workbooks.Open Filename:=myPath & myFile sh.Cells(i, 1) = ActiveWorkbook.Sheets("Team Sales").Cells(1, 2).Text sh.Cells(i, 2) = ActiveWorkbook.Sheets("Team Sales").Cells(2, 2).Value ActiveWorkbook.Close savechanges:=False myFile = Dir i = i + 1 Loop Application.ScreenUpdating = True End Sub #excelmacro #excelvba
Excel VBA Mastery Kit
AI-recommended products based on this video

Open Office Suite 2024 Professional Edition CD DVD 100% compatible with Microsoft® Word® and Excel® for Windows 10, 8, 7, Vista, XP And Mac OS X

Cozy Corner: Coloring Book for Adults and Kids

The Complete Baking Book for Young Chefs: 100+ Sweet and Savory Recipes that You'll Love to Bake, Share and Eat!

Hello, Baby Animals: A Durable High-Contrast Black-and-White Board Book for Newborns and Babies

Little Blue Truck's Halloween: A Fun And Interactive Lift-the-Flap Book For Kids Celebrating Halloween With Little Blue Truck And Friends
![Short USB C Cable [4-Pack 8 inch], SUMPK 3A Fast Charging USB 2.0 Data Transfer to Type C Phone Charger Cord Nylon Braided Compatible with Samsung Galaxy S10 S9, Pixel 3, LG V30, Charging Station](https://m.media-amazon.com/images/I/71GPEzylAaS._AC_UL960_FMwebp_QL65_.jpg)
Short USB C Cable [4-Pack 8 inch], SUMPK 3A Fast Charging USB 2.0 Data Transfer to Type C Phone Charger Cord Nylon Braided Compatible with Samsung Galaxy S10 S9, Pixel 3, LG V30, Charging Station

Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset

USB C Hub Multiport Adapter for MacBook Pro/Air M1 M2 M3 M4 2025-2018, Melelink 8 in 2 Mac USB Adapter Dongle MacBook Accessories with HDMI 4K, Thunderbolt 3, USB C&A Data Ports, SD/TF Card Reader




