Macros & VBA Training Series Part 1:

Writing Your First Macro & The Excel Object Model

Double-click video to view in Full Screen HD.

Download the file used in this video:

My First Macro.xslm (93.0 KB)

Macros & VBA Training Series
Enroll for FREE

The video above is the first in a 3-part training series. Can I send you the next two videos?

Please click the link below to enroll in the free training. I will send you video #2 in just a few days.​

Video 1

Intro to VBA:
Writing Your First Macro

Video 2

Automating Tasks:
The Summary Report

Video 3

The Exports Sheets App

Please click the big green button above to register for the free training series.

About Me

Welcome to Excel Campus!  I am excited you are here!

My name is Jon Acampora and my goal is to help you learn Excel to save time with your job and advance in your career.  I've been an avid Excel user and VBA developer for 10+ years.  I am also a Microsoft MVP.  When I'm not looking at spreadsheets, I get outdoors and surf. πŸ™‚

What Process Do You Want To Automate in Excel?

Please leave a comment below with your answer, and any questions.  Thanks!​

Click Here to Leave a Comment Below 1364 comments
Reg - March 20, 2018


Your first video was terrific! Have been a self trained Excel user for many years and now realize there is a much better way. Can hardly wait to learn more.

Thank you!


Kenneth - March 18, 2018

Hi Jon
Just joined. Seems like you can manage to really break the complexity of VBA coding into something fun and value adding in your daily work. Looking forward to following these these tutorials. /Kenneth

Lard - March 13, 2018

Easy to understand.

Sandeep Kothari - March 11, 2018

Hey Jon

I watched your videos & attended your webinars & have become your fan since then. I also spreading a word & more about you in my circle & sharing your links. May God bless you & your family. Carry on the good work.

May - March 11, 2018

Hi David,
You are a very good teacher. Being a beginner to VBA and macro, you have made it simple to understand!
Looking forward to the next lesson. Thank you.

Marie - March 9, 2018

Thanks for breaking the creation of a macro down into the basics and relating it to something common like peeling a banana to eat it. This was helpful since I haven’t built macros from scratch. You are an excellent instructor!

Gayatri - March 9, 2018

Hi Jon,

I need your help to create a pivot table in vba. I have different ideas to create a pivot but its thrown type miss match error 13. Could you please solve this problem

David - March 8, 2018

Thank you Jon!
great Videos. Here is my challenge: I need to reference a closed workbook on our onedrive and update data daily in a second workbook.

Mangala - March 7, 2018

Woow excellent this is my first experience with Macro thank you so much.i like the way you teaching.

Maureen - February 28, 2018

I have really appreciated your teaching style. One of the problems that i am running into is that I have a very large spreadsheet made by someone else, the headers are on various rows and the data is simply copy and pasted to continue a daily bunch of data for each day of the month and every month of the year. I have struggled trying to figure out where to even start to extrapolate some of that data into useful pivot tables and charts. I realize that VBA will help but again not sure where to start because there are not necessarily specific total locations. The totals are just placed under the given chart that was created from the months data. I have signed up for the webinar but can you advise how to tackle large pieces of information that do not necessarily have a designated spot for totals.

Gloria Bukachi - February 27, 2018

In the first video, i have understood about referencing, I was just copying VBA codes and most of the time it would not work. Today i have found you on Youtube after 3 weeks of searching. Now I am understanding the step by step coding in VBA especially on allowing VBA to assume worksheets and references.
I have been given a task to create a data manipulation program on a very large database program. the sources are form web programs, manual entries.
the program should Add, delete, remove duplicate, search and save in a different sheet/workbook according to criteria, use forms and have password.
If you could help
It would be wonderful

Adrianna - February 26, 2018

I want to automate sending emails to individuals when the specific value in a cell is anywhere from 5 and 13. There is a specific Outlook template assigned for each number (5-13). I currently have code written, but am having the for each loop exit after sending only a handful of the emails. It’s never the same amount of emails sent. It works fine in my smaller test files, but when applied to a workbook with 200+ individuals, it only sends a few of the emails.

Hits - February 25, 2018

Hello Jon
I want to create a macro and would require your help regarding the same. This is regarding the automation for copy comments from old file to new file.
Its a report that needs to be reviewed every month. I want to copy the comments (updated in last column) from previous month report to New report so only new records can be addressed and old records can be filtered out. There are multiple reports and Concatenate, Vlookup takes a lot time.
I want to attach the report but there is no option to attach the document.
There are multiple rows and so has to concatenate the columns to make a unique cell in both old and new report and then to apply vlookup. I need your help to make this process automate. Could you please let me know how can we use macros or VBA coding in this scenario.

Thank you in advance.

Ravish Modi - February 23, 2018

I want to prepare a macro which defines its own range from first active cell having data to last active cell that has data, post which it should be preparing pivot of that range.

Also if i filter data [same range] and i want to delete all rows that have values [that user will himself define in separate list], how should i do that because i dont want macro to get stuck if it doesnt find that value in data.

Rick - February 20, 2018

Great intro to macros. I have developed many macros using the Marco recorder but always wanted to automate more. I was looking for a video, class, seminar on VBA. Thank you.

Richard - February 19, 2018

Fantastic, easily understood videos Jon ! Enormously helpful ! Thank You !!!

Dan - February 14, 2018

Great video, looking forward to more. I am working on a spreadsheet to log employee work hours and pay rates.

Jack - February 13, 2018

Thanks Jon. Your first video regarding macros was very helpful and easy to understand.

Dan Husmann - February 11, 2018

Excellent job of setting a baseline on the copy and paste functions. Understanding the basic operations of functions in Excel really helps as one moves on to the advanced features, functions, and formulas. I am not writing to obtain assistance in solving a problem, just wanted to commend you on the work you have done with Excel and especially with the production of the videos. This really shows your passion for educating Excel users, but your interest in making all of us Excel rookies and veterans better at what we do with Excel.

Keep up the good work and recognize that there are millions of of us that are benefiting from your knowledge and your willingness to share it with all of us. I am sure anybody who sees these videos is gaining value from the content and your presentation.

Good on ya.

    Jon Acampora - February 14, 2018

    Hi Dan,

    Thank you for the nice feedback. I really appreciate your support and happy to hear you are benefiting from the training. Yes, it is definitely my passion to help others learn Excel & VBA. Thanks again and have a nice day! πŸ™‚

Christine Richmond - February 9, 2018


I need video’s 2 and 3 now. Thank you! Great video on VBA and Macros for beginners!

Kevin - February 7, 2018

A1 B1 C1 D1 E1 F1 G1
Davy 340 Barnett Way San Antonio Texas 3435

I want to do c1&””&d1 in g1 and copy the value only back to c1.

Ashita - February 4, 2018

Hello Sir John,

Thanks for your assistance.

I want to create a macro and would require your help regarding the same. This is regarding the automation for Payroll. In sheet one I have detailed inputs for payroll which includes the Emp code,Name and other incentive along with the amount. In sheet two I have just mentioned E.code,Name,email ID & Months.

Now what require is when I type the employee ID the name, email Id automatically flashes in sheet 2 and at the same time when I choose the allowances it should populates figures from sheet 1 for each month.

I just wanted to know how can we use macros or VBA coding in this scenario.

Thanks & Regards

    Jon Acampora - February 6, 2018

    Hi Ashita,
    Great question! We can use Events in VBA to automatically run macros when the user takes an action like changing a cell. Here is a video that explains more about VBA Events. I hope that helps get you started. Thanks! πŸ™‚

Jan Herzog - January 31, 2018

Hi Jon,

I really enjoyed the VBA webinar and would like to sign up for the VBA Pro class. Can you send me the link?

sajeed ahmed shaik - January 29, 2018

I am intresting please

DOMINIQUE ORAIN - January 24, 2018

Very good introduction to Excel VBA. Very good pedagogy. I’m looking forward seeing the other videos.
Great Thanks.

Rahul - January 24, 2018

Hi Jon,

First of all Thanks for sharing all of your Excel experiences and teachings through your tutorial videos, tips and shortcuts which is not only enhancing our excel skills in doing our daily work but also helping us to get recognised by our boss. Your Pivot Tables videos have really helped me a lot to receive that recognition. Thank you so much Jon Sir.

Really enjoyed your First Video on Macros & VBA. I might say A video worth watching for a Beginner to start with Macros and VBA. And yes I am a Beginner in Macros.

I wish if Macros & VBA can help me in doing my daily task of reconciling the Accounts Receivable of one company with Accounts Payable of another company via Invoice or Bill numbers, where the tons of data are stored in different Excel files. Presently I am using Vlookup to extract data from other files and sheets & Countif formulas to check duplicacies of Invoice numbers.

Is Reconciliation possible in Macros??

Kindly suggest.

Thanks & Regards,

Paul - January 22, 2018

Hello John,
Love learning about the potential of Excel. Really enjoyed the first video, looking forward to more.

Abdul - January 21, 2018

Hello Jon!
I really appreciate your work! You are Really doing a great work!
I wonder if you can help me with this matter.
I am a university assistance professor, teaching classes with big number of students. I have designed a VBA to grade 15 question, MCQ Pop Quiz. every student has to log in and take the test. When the student finishes, I come after him and press grading key to get the grad. What I need is an excel VBA code to read all excel files and collect all the names, students’ numbers, and students’ ID number and sort them in one excel sheet
Do you have any Idea?
Thank you in advance
Dr Abdulhakim Sultan

PA - January 18, 2018

Read the whole entry. I made several attempts to record a macro and then modify it to automate a series of copies with no luck, all on the same sheet.
* I would be happy to get past Step (A) but it would be great to learn how to complete all three processes!
* Here are my three process with a progressing advancement in each one.

(A)- Copy 3 cells from A3:C3 to the current cell B1 { If that worked then …..}
(B)- Insert those 3 cells to the current cell B1 [Shift right]{ If that was working then add …. }
(C)- Automatically copy the 3 cells to and Insert them at B1 then advance to G1 ( 4 columns down because there is existing data in the and then repeat until last cell in ROW 1 or for the number value I would use in a counter loop

{ I have a current row of about 65 columns of data and I need to insert these 3 cells after each of the existing cells in that top row,which become my repeating headers. The rest of the data populating would not be as easy so this would provide a standard format that I could use in some Vlookup or HLookup formulas. I have done some macros and vba in the past.
— Any similar sample would be great, I learn my examples.}

Amaka - January 18, 2018

Hi Jon,
How do I automate a financial system for a co-operative society where monthly contribution is made into a consolidated fund account, withdrawals can be made at any time, loan can be requested by contributors at anytime, and interest payment to contributors on amount contributed. Need your help

Ludo - January 16, 2018

I have several xlsx files containing orders. Structure of all files is identical.
All xlsx files are copied to crresponding sheets in 1 new xlsx.
I want to add a new sheet on which all cells are added-up to 1 total per aricle / manufacturer (= by row).
I want to use VBA and not a function to make this easy to use for our staff.
All macro’s connected to a button on 1 xlsm.

Kind regards

    Jon Acampora - January 16, 2018

    Hey Ludo,
    That definitely sounds like a task for VBA. I do have some training in my VBA Pro Course on how to merge worksheets. You could also use a pivot table for the calculations once the data is combined. Or you could use VBA for that. Lots of possibilities with Excel! πŸ™‚

JC - January 15, 2018

I want to automate the daily production report. Now we have to manually copy the numbers and dates of production to track them.

    Jon Acampora - January 16, 2018

    Hey JC,
    Yeah, manual copy & paste is no fun. I’ve done my fair share and that is what got me started learning macros. Sounds like a task you can definitely automate.

Mario - January 15, 2018

Excellent for Macros & VBA beginner’s level!!!

David - January 14, 2018

Have ‘toyed’ with excel and cell formulas for decades (Civ. Eng. studies in early 90’s) but now want to use VBA to pull apart text strings (separated by ; in 1 cell) inside monster sized sheets of .csv CRM’s (Customer Relationship Mngt) with potential leads there to be had…if only I can get the VBA to insert rows and associate the multiple emails in one cell with its company in the cell next to it. I.e. delimit the email cell with 1,2,5,15 emails in it, then insert same number of rows below to paste each email and its owners name and company name. Tiresome to do ~100 companies… try 22k of them : /
I know it’s possible for VBA gods, can I be taught this?

    Jon Acampora - January 16, 2018

    Hey David,
    Great question! Yes, this sounds like something that can be solved with VBA. As you said, there is some string work to be done with separating the emails by the separator into an array, then transposing that and outputting it down the sheet.

    I don’t have specific training on this yet, but will add it to my list for lessons for the future. Thanks!

Mountaga - January 13, 2018

Hello Sir Jon,

I am a fan of Excel and VBA in particular. I have appreciated this video because of its simplicity. I am even thinking of using its methods in a VBA class I am going to deliver in few days,in a physical classroom :). Could you please help me to provide a good class with good contents and efficiency.

Thanks in advance


Leave a Reply: