Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
546 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
You are welcome to try any of the 52 Excel VBA Macros exercises listed below, but please do not distribute them in any form without asking for our written permission first.
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Relatively easy |
Exercise: | Using Microsoft Excel to record macros to navigate round a maze. |
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Average difficulty |
Exercise: | Record a macro to change the colours of various parts of a house - including adding command buttons. |
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Average difficulty |
Exercise: | Record a macro to format a cell containing an elephant suitably, then strip out unnecessary lines. |
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Average difficulty |
Exercise: | Using absolute recording mode to record macros to repeat actions on the same set of cheesy cells. |
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Harder than average |
Exercise: | Record a macro to apply data validation and protection to a cell for talent contest data. |
Software: | Excel VBA Macros |
Topic: | Recording macros and buttons |
Level: | Harder than average |
Exercise: | Record a macro which will use a combination of absolute and relative cell referencing to add another period of data. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Select one cell in a battleships grid relative to another. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Write a simple macro to guide Red Riding Hood through a maze, using lots of OFFSET commands. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Write a subroutine to enter your details into an application form for a dating agency. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Write code to change the colour of cells and sink ships in a rudimentary version of Battleships. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Write macros to select various ranges absolutely using a battleships game as template. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Relatively easy |
Exercise: | Write one or more simple macros to fill in capital cities on different worksheets (shows selecting worksheets and selecting cells). |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Average difficulty |
Exercise: | Use the End and Offset properties in Excel VBA to copy the details of dating-agency applicants to the end of a list. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Average difficulty |
Exercise: | Write a macro to select a column of celebrity marriage data, then amend it to select a rectangular block. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Average difficulty |
Exercise: | Write a macro to select the last task in a block of tasks for Bob the Builder. |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Harder than average |
Exercise: | Create a macro to select almost down to the bottom of a block of Muppets data (using OFFSET and END). |
Software: | Excel VBA Macros |
Topic: | Selecting cells |
Level: | Harder than average |
Exercise: | Practise on a battleships grid using more difficult selection techniques, such as resizing a selection and using the UNION method. |
Software: | Excel VBA Macros |
Topic: | Messages and variables |
Level: | Relatively easy |
Exercise: | Write a macro which asks for your name using INPUTBOX and then displays a welcome message using MSGBOX. |
Software: | Excel VBA Macros |
Topic: | Messages and variables |
Level: | Average difficulty |
Exercise: | Use input boxes in Excel VBA to ask a user to enter details for a dating agency application. |
Software: | Excel VBA Macros |
Topic: | Messages and variables |
Level: | Average difficulty |
Exercise: | Write a macro to input a dinosaur name using an INPUTBOX, find it on a spreadsheet and then display the height of the dinosaur using MSGBOX. |
Software: | Excel VBA Macros |
Topic: | Messages and variables |
Level: | Harder than average |
Exercise: | Use MsgBox to display a message asking user whether they want to continue or not, and process answer. |
Software: | Excel VBA Macros |
Topic: | Visual Basic explained |
Level: | Relatively easy |
Exercise: | Spot why the pictures are not genuine Visual Basic collections. |
Software: | Excel VBA Macros |
Topic: | Visual Basic explained |
Level: | Average difficulty |
Exercise: | Converting English sentences into Visual Basic, using properties, methods, objects and collections. |
Software: | Excel VBA Macros |
Topic: | Visual Basic explained |
Level: | Average difficulty |
Exercise: | Name the VBA objects, collections, etc referenced in a screen shot, and write out some VBA commands. |
Software: | Excel VBA Macros |
Topic: | Loops and conditions |
Level: | Relatively easy |
Exercise: | Write a macro to loop over cells following instructions until you reach the cottage of Red Riding Hood!. |
Software: | Excel VBA Macros |
Topic: | Loops and conditions |
Level: | Average difficulty |
Exercise: | Loop over rows of data (rollercoasters) building up message displaying only wooden ones. |
Software: | Excel VBA Macros |
Topic: | Loops and conditions |
Level: | Average difficulty |
Exercise: | Use a Do Until loop to extract invalid data from a list of dating-agency applications in Excel VBA. |
Software: | Excel VBA Macros |
Topic: | Loops and conditions |
Level: | Average difficulty |
Exercise: | Use If statements in Excel VBA to validate a set of user inputs in a Dating Agency workbook. |
Software: | Excel VBA Macros |
Topic: | Loops and conditions |
Level: | Average difficulty |
Exercise: | Write a macro to loop over a column of dinosaurs, colouring the ones meeting certain conditions. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Relatively easy |
Exercise: | A macro to loop over shapes on a worksheet changing their line colour - lots of hints given. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Average difficulty |
Exercise: | A macro to loop over the 100 x 100 grid that is Wimbledon Common and find and report on all of the Wombles found (ie the non-blank cells). |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Average difficulty |
Exercise: | Change a team strip from green to (eg) red by looping over all of the cells in a range. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Average difficulty |
Exercise: | Loop over all of the cells in a block, creating a psychedelic pattern to resemble Elmer the elephant. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Average difficulty |
Exercise: | Use For Each loops to split a single table of data into three separate worksheets. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Average difficulty |
Exercise: | Write VBA code in Excel to loop over a collection of cells to pick a set of six random numbers to use in a lottery. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Harder than average |
Exercise: | Create a game of hangman in VBA, to include lots of functions. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Harder than average |
Exercise: | Create a macro to fill in a word search. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Harder than average |
Exercise: | Generate unique hands of cards to deal a poker game in Excel. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Harder than average |
Exercise: | Loop over a set of mortgage deals and create an output file which compares them. |
Software: | Excel VBA Macros |
Topic: | Looping over collections |
Level: | Harder than average |
Exercise: | Loop over all of the continent worksheets in a world workbook, copying the bottom cell of each worksheet. |
Software: | Excel VBA Macros |
Topic: | Event handling |
Level: | Relatively easy |
Exercise: | Use the BeforeSave event to attach a macro to a workbook to keep a log of changes. |
Software: | Excel VBA Macros |
Topic: | Event handling |
Level: | Average difficulty |
Exercise: | Display various messages for a workbook after various events (eg trying to close the workbook, clicking on a cell). |
Software: | Excel VBA Macros |
Topic: | Event handling |
Level: | Average difficulty |
Exercise: | Use worksheet events to create a basic game of Battleships. |
Software: | Excel VBA Macros |
Topic: | Event handling |
Level: | Average difficulty |
Exercise: | Various macros to test your understanding of event-handling within Excel (and annoy users!). |
Software: | Excel VBA Macros |
Topic: | Functions |
Level: | Average difficulty |
Exercise: | Create functions to turn feet/inches into kilograms, stones/pounds into metres and then calculate body mass index. |
Software: | Excel VBA Macros |
Topic: | Debugging and error handling |
Level: | Relatively easy |
Exercise: | Use the On Error statement in a VBA procedure to prevent users entering an invalid date into an input box. |
Software: | Excel VBA Macros |
Topic: | Forms |
Level: | Relatively easy |
Exercise: | Create a form to enter a film name and category, such that when you click on an ADD button the film is added to an Excel list. |
Software: | Excel VBA Macros |
Topic: | Forms |
Level: | Relatively easy |
Exercise: | Create an Excel VBA user form to allow users to apply to a dating agency. |
Software: | Excel VBA Macros |
Topic: | Forms |
Level: | Average difficulty |
Exercise: | A form for entering details of dinosaurs, including a combobox, listbox, option buttons and spinner buttons. |
Software: | Excel VBA Macros |
Topic: | Forms |
Level: | Harder than average |
Exercise: | Get a macro to run when you open a workbook which creates a list of all of the worksheets and displays these in a form combo box for quick nvaigation. |
Software: | Excel VBA Macros |
Topic: | Referencing other applications |
Level: | Average difficulty |
Exercise: | Create a macro which opens a Word document and puts mail merge fields at the right bookmark locations. |
Software: | Excel VBA Macros |
Topic: | Referencing other applications |
Level: | Average difficulty |
Exercise: | Use the Microsoft Scripting Runtime object library and FileSystemObjects to manipulate files and open workbooks. |
You can search our full list of VBA exercises here. Or why not learn to do them the right way on one of our VBA training courses? You can attend our online training classes wherever you are in the world!
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.