Compare Ranges in Excel VBA
Below we will look at a program in Excel VBA that compares randomly selected ranges and highlights cells that are unique. If you are not familiar with areas yet we highly recommend you to read this page first.
Excel VBA tutorials — macros, events, automation, and everything you can script.
Below we will look at a program in Excel VBA that compares randomly selected ranges and highlights cells that are unique. If you are not familiar with areas yet we highly recommend you to read this page first.
This example teaches you how to compare dates and times in Excel VBA. Dates and times are stored as numbers in Excel and count the number of days since January 0 1900. What you see depends on the number format.
Below we will look at a program in Excel VBA that finds the second highest value.
Below we will look at a program in Excel VBA that loops through all closed workbooks and worksheets in a directory and displays all the names.
This program in Excel VBA uses the Count property IsNumeric function IsEmpty function and Intersect method to test a selection.
This chapter teaches you how to deal with macro errors in Excel. First let's create some errors.
Below we will look at a program in Excel VBA that loops through the entire first column and colors all values that are lower than a certain value.
The Array function in Excel VBA can be used to quickly and easily initialize an array.
As a beginner to Excel VBA you might find it difficult to decide where to put your VBA code. The Create a Macro chapter illustrates how to run code by clicking on a command button. This example teaches you how to run code from a module.
Below we will look at a program in Excel VBA that loops through all open workbooks and worksheets and displays all the names.
To get the size of an array in Excel VBA you can use the UBound and LBound functions.
Below we will look at a program in Excel VBA that creates an interactive Userform.
Below we will look at a program in Excel VBA that creates a rolling average table.
The scope of a variable in Excel VBA determines where that variable may be used. You determine the scope of a variable when you declare it. There are three scoping levels: procedure level module level and public module level.
Learn how to work with dates and times in Excel VBA. The following macro gets the year of a date. To declare a date use the Dim statement. To initialize a date use the DateValue function.
The MsgBox is a dialog box in Excel VBA you can use to inform the users of your program.
Below we will look at a program in Excel VBA that creates a pattern.
Below we will look at a program in Excel VBA that creates a User Defined Function. Excel has a large collection of functions. In most situations those functions are sufficient to get the job done. If not you can create your own function called User Defined Function or custom Excel function. You can access a User Defined Function just like any other Excel function.
The MsgBox function in Excel VBA can return a result while a simple MsgBox cannot.
The 'subscript out of range' error in Excel VBA occurs when you refer to a nonexistent collection member or a nonexistent array element.
By default UDF's (User Defined Functions) in Excel VBA are not volatile. They are only recalculated when any of the function's arguments change. A volatile function will be recalculated whenever calculation occurs in any cells on the worksheet. Let's take a look at an easy example to explain this a bit more.
The Close and Open Method in Excel VBA can be used to close and open workbooks. Remember the Workbooks collection contains all the Workbook objects that are currently open.
Below we will look at a program in Excel VBA that highlights the row and column of the Active Cell (selected cell). This program will amaze and impress your boss.
Code added to the Worksheet BeforeDoubleClick Event will be executed by Excel VBA when you double click a cell on a worksheet.