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 1461 comments
Steve Minder - January 16, 2019

I want to write a macro that copies the values in a sheet and then sorts the data on each line individually for all rows in that copied sheet (the data to be sorted will be in the range D2:AA500

Steve Dockham - January 14, 2019

I am reviewing your training in order to learn how I can sort a column of IP addresses correctly, where IP address will fall above I also need the that sorting function to “Expand Selection” so that the reset of the sheet follows the IP in the same row. I work with IP addresses and MAC addresses all day long so being able to sort them properly will save a great deal of time.

Thank you

Dave - January 13, 2019

I’m new to VBA and found this great instructional video of yours very helpful. I’m looking forward to the way you teach this course which is very easy to follow. Thank you.

Sigurd Osewald - January 13, 2019

Very good and detailed explanations. I think this helped me finally out of some problems in understanding what objects is all about. Thank you!

Santosh Bhandari - January 11, 2019

Hi Jon, I have two Excel first excel is main file and second file currency change rate. How to convert currency (USD,INR to GBP) format.

First excel: Main Excel :

Empno Ename Amount Currency Total Amount Month Country
100 Sam 20000 INR Convert Currency Nov’18 United Kingdom
101 Ding 1140 USD Convert Currency Nov’18 United Kingdom

Second Excel : Currency Rate excel :

11/10/18 66.34 73.45 93.85
01/11/18 65.32 74.34 94.45 only pick 01/11/18 rate
12/11/18 66.23 77.34 95.34

Every month 1 date pick currency rate and convert currency in main file

Santosh Bhandari - January 11, 2019

Hi Johan,

I have one question?, I have 2 file first file is main file and second file currency rate, first time check date in currency rate excel if every month 1 date currency rate 98.23 this value is locked and convert (INR,USD to GBP) format.

Ex: first excel:
Empno Ename Amount Currency Total Amount Month Deptno

100 Sam 20000 INR Convert value Nov’18 20
101 D 1140 USD Convert Value Nov’18 30

2: second excel

21/09/18 62.8 77.34 93.54
01/10/18 66.3 76.45 94.32
18/10/18 67.4 77.34 94.3

Only capture every month 1 date currency rate excel and convert INR and USD currency to GBP format in Main file (first excel).

Manoj - December 31, 2018


This is really helpful, your concept of explaining is very good and simple to understand.



Curt - December 31, 2018


I’ve enjoyed your YouTube excel video tutorials. I’m interested in taking your VBA Pro course, but must have missed the sign up. When do you plan to offer it again? Thanks so much.



Savannahli - December 28, 2018

Jon, thank you so much for sharing this video. It’s very easy to understand and apply!

sunny - December 21, 2018


Thank you very much for the above video, very informative and easy to understand. I am working as an equity analyst and use financial modeling extensively. I would like to know more how macro & VBA can be used in financial modeling. I would be grateful if you can share some basic educational videos on it.

Thank you once again and have a great day.


David - December 19, 2018

I am creating a spreadsheet to keep track of loaner vehicles for a client. I am trying to use VBA to automatically duplicate loaner vehicle entries automatically for customers who need a car for multiple days.

JOSHUA - December 19, 2018

I want to transfer item numbers and skus from an invoice sheet that I’ve created to my out inventory sheet. my invoice where the data is located is not formatted as a table but my out inventory sheet is. I need for the blank cells from the invoice sheet to be ignored and for the transferred items to be added to the list following the previous entry. all done with the click of a button located on my invoice sheet

Thomas G. Crowe - December 14, 2018

Nicely done, thank you!

Bob - December 10, 2018

Thank you for a well done and informative webcast on Excel VBA. I look forward to viewing more!!

Cees - December 10, 2018

Hi Jon,

I have a column and in each cell there is some variable length text which is followed by a / and there after again some variable length text. I want to get the text behind the / moved to another column and deleted in the original column.

Rosetta Hernandez - December 4, 2018

Hello Jon,

First, I am looking for way to automate the copy and paste of data from excel files containing data downloaded from a mainframe financial application in xls format into a workbook containing a sheet for each department in our division to create budgets annually. These need to be distributed to the department heads to verify, update and correct before being returned. Once returned,the information will be consolidated and averages and projections will be applied with supporting commentary and they may be interrogated for ‘what if’ scenarios as needed throughout the year. Secondly, I am interested in consolidating data obtained from a vendor application that is downloaded in csv format and massaged into reports and charts showing revenues and distributions for several years that can be uploaded onto a website. A dashboard format might even be useful for these reports.

Savio - November 29, 2018

Hello Jon
I am trying to set a PASS or FAIL status in a cell that needs to look for parameters within a group of parameters for example,

1 values between 342 to 418 PASS above or below FAIL (Target number is 380)
2 Values Between 360 to 440 PASS above or Below FAIL (Target number is 400)
3 Values between 369 to 456 PASS above or Below FAIL (Target number is 415)

Thanks you for your advice

Kind Regards

Wasiu - November 26, 2018

To be candid, your presentation of the class tutorial video has really change my perception about learning excel from impossibility to possible. I think this video is bringing me back on track and is nothing but making learning VBA easy without stress.
However, the project I have at hand is writing a vba code for processing of large volume of combustion data. I will be glad if this target could be achieved via the knowledge I will garner from your tutorial classes.

Thank you.

Peter - November 21, 2018

Hi Jon,
nice video. I would like to extract colored sections of text out of cell which contains plain text and differently colored sections. Each color will have its own destination. Have you done that before, can it be done?

Best regards,

emily - November 12, 2018


Would like to ask some vba code for below:
1.How to copy an opened excel file with today’s date in its name into another workbook? As i created vba for “Browse For File” to open an excel. eg: Windows(Payment Dated 12 Nov 2018)
2.How to copy filtered data (from range A to range C) in a workbook into another workbook?

Mohammad - October 31, 2018

Very nicely explained! Thanks.

Frank Bacchus - October 31, 2018


I enjoyed looking at the first video on Macros and VBA and must say that I would recommend any of your videos & classes to anyone. I haven’t received the links to the workbooks you were using in that session and was wondering if you can please sent it to me. Thanks and hope to join you again.


gunita - October 23, 2018

Hello Jon,

I am usual copy cat with vba codes and then just amend to my needs. I am trying the copy a value from column b. Some cells are empty and i want to exude them. Then all that past completely different excel workbook sheet. I will have a button in Workbook(“BOOK2.XLS”) this what i would expect to look.


LastRow = Range(“B65536”).End(xlUp).Row
For i = 1 To LastRow
If IsEmpty(Cells(i, 1)) Then
Cells(i, 1).Copy

End If
Next i

Thank you so much

Rana - October 13, 2018

Dear Sir, when I watch this video and at least able to create My First Macro File. I notice that there is a file (VBAProject(EC_Tab_Hound.xlam) I tried to create im my file but I coudn’t find xlam extention. So I need your advise.

Laki - October 3, 2018

Dear Jon,

When you will send me a new video?

Thank you in advance,

Joel Klein - October 2, 2018

Hey Jon,
I was able to boss to spring for the VBA for Excel course. They went to register me today and found that enrollment was closed. Please let me know when the next class is scheduled and/or what are my options.


Ron - October 1, 2018

Hello Jon, I would like to automate the posting of values from a FTP server to an excel report.
The values are : Date, Time, and Gallons, and the server creates .CSV files with this information.
The gallons value is a process reading automatically updated once a day, it needs to be recorded and
stored, therefore the next days reading must increment to the next row of cells and so on.
At the end of the week a new worksheet must be opened, and the process repeated with a new work
sheet every week, for 52 weeks.
I’ve experimented using the Windows scheduler to trigger a .VBS file from a .bat file which runs a Macro
in order to email the report, and that works well, but does not complete the requirements for whole
process, as you can see.
Any recommendation would be greatly appreciated. By the way I have had a VBA course in the past but
it was probably in 2005 or so , mostly dim awareness at this point, as I haven’t used it.
Thanks in advance for any help you can provide.

JOHN - September 30, 2018

Jon for some reason today when I tried to download the second free video I get a thing that says javascript but doesn’t download Any ideas why this is happening Thank you


Leave a Reply: