Download the Practice Workbook Download this practice workbook to exercise while you are reading this article. Introduction to the VBA Concatenate Function ⟴ Syntax String1 = "First Text" String2 = "Second…
The VBA Val function is an Excel Text function which converts a text string into a numeric value. You can use this function in a VBA code to get the starting number part…
We’ll first discuss how to write code in the Visual Basic Editor. Follow the simple steps to create the setup for writing your code. Steps: Go to the Developer Tab in the…
Method 1 - Use VBA Replace to Find a Word and Replace We have the following dataset of six students and their status of present or absent in the class. We'll find…
In this article, we'll explain how to use the VBA Weekday function in Excel. VBA Weekday Function (Quick View) Running this code will return 7, because the date “1/1/2022” was Saturday, and…
This is an overview. Download to Practice The VBA Mod Function Summary The VBA Mod operator divides the number by the divisor and returns the remainder. Syntax Number1 Mod Number2 (Divisor) Arguments Arguments Required/Optional…
Method 1 - VBA to Format Numbers with Predefined Formats Below is the VBA code which covers all the predefined formats to Format numbers in Excel. The predefined formats are Currency, Fixed,…
Download Practice Workbook Function 1 - DateAdd Function as Date in VBA In VBA, we use the DateAdd function to add days in a particular date. This will return the resulting date.…
When you need to find the position of a character inside a string or the occurrence of a substring inside a string, the VBA InStrRev function might be the best option. Unlike…
Excel provides several VBA functions that can be used while writing a macro or to define your own function to perform your desired tasks. In this article, we are going to show…
Download Practice Workbook Download the following workbook. The MsgBox Function in Excel Objective: The MsgBox function is used to create a message box, also known as a dialog box. Syntax: MsgBox (Prompt,…
How to Launch the VBA Editor in Excel If you don’t see the Developer tab, enable the Developer tab. Select the Developer tab and click on Visual Basic. Alternatively, you can press…
This is an overview. The VBA TRIM Function Summary The Trim function in VBA removes the leading and trailing spaces from a supplied text string. Syntax Trim(string) Arguments Argument Required/Optional Value string…
Download Practice Workbook Introduction to VBA Asc Function The VBA Asc function is a built-in function in Excel. This is a String/Text Function. We can use it as a VBA function (VBA)…