Category Archives: Excel

Using the VLookup Function in VBA

The VLookup function is an Excel function.  It can be used directly on your worksheet without having to use any VBA code.  However, there may be instances in VBA where you wish to also use VLookup functionality. You would then need to call the VLookup

The VBA OnTime Method : How to Set Up Scheduled Tasks

With Application.OnTime, you can schedule a macro (a procedure) to run at a specific time in the future. This is especially useful for setting up scheduled tasks which you want your computer to kick-off while you’re away from your computer, such as night jobs. OnTime

The ReDim Statement in VBA

The ReDim statement is used to declare the size of a Dynamic array in VBA.  It can later be used to re-declare the size of the array as many times as you need.  It can only be used for Dynamic VBA Arrays (where the size

How to Use the Mod Operator in VBA

Introduction Mod stands for Modulo. It is a mathematical operator that returns the remainder, or modulus, of a number after performing division. The Mod operator is not only helpful when you want to know the remainder in division, it is also powerful when you want

Using the UCase Function in Excel VBA

There may be a time in Excel that you need data that you are fetching from an Excel spreadsheet or importing from external data to be amended to upper case.  This can, of course, be done manually, but if it is a large amount of

How to Pause a Macro: The VBA Wait Method

The VBA Wait method is used to pause the execution of a macro, suspending all Microsoft Excel activities until a certain time is elapsed. Syntax Application.Wait(time) The function requires one mandatory parameter input of time, which is the time you want the macro to resume,

The Ultimate Guide to Looping Through Ranges in VBA

The art of Excel VBA programming is in the manipulation of properties of objects of Excel. The more skillfully you can play with these objects and properties, the more powerful the macros you can build. The number one object in Excel you have to process