VBA Date Format

The Date Format function accepts a date expression as input and returns a string comprising the expression in the specified format. The Format function is a built-in one in Excel VBA that may be broken down into two subsets: Date Function Time Function Dates can be formatted in Excel VBA in two distinct methods NumberFormat …

VBA Date Format Read More »

VBA VLookup

One of Excel’s most powerful and flexible tools is the VLookup feature. It’s common to be compelled to code a VLookup macro in Excel VBA as you gain experience with macros. The Excel VLookup function is useful for finding a matching value in another column by searching an array. One of the most used features …

VBA VLookup Read More »

VBA InputBox

The VBA InputBox prompts the user for values. The dialogue box displays a message and anticipates a response from the user in the form of a button press. On clicking OK or Enter, the InputBox method will return the inputted text to the text box. When the user presses the Cancel button, the InputBox method …

VBA InputBox Read More »

Excel VBA Find

The Find function is often useful in VBA. You can use the Find tool to know a specific value or format in a group of cells. Using Find is functionally equivalent to using Excel’s Find Dialog. Ctrl + F is a keyboard shortcut that searches the entire sheet and workbook for the specified word or …

Excel VBA Find Read More »

VBA Dim

In Visual Basic for Applications, the term “dimension” is represented by the VBA Dim. It also helps to set the names and types of variables. The macro codes all begin with a VBA Dim. Syntax Dim [Insert Variable Name] as [Insert Variable Type] The four varieties of Dim statements are as follows: 1. Basic Variables …

VBA Dim Read More »

Excel VBA Range

The VBA property “Range” allows you to narrow your selection to a single cell, a range of cells, a row, a column, or a region in three dimensions. The VBA range object in Excel can refer to a single cell or multiple cells across several rows and columns. Using Visual Basic for Applications (VBA), Excel …

Excel VBA Range Read More »

VBA Comments

Comments are lines of code skipped over when the code is run. In the coding, these are shown as green text. Descriptions of the code are provided in the comments. A comment is any remark in the VBA code after an apostrophe. Knowing the proper usage of comments is crucial when working with large and …

VBA Comments Read More »