In VBA, you may get today’s date by: 1- Using Date() function 2- Now() function
The Split function is used to break a given string. It returns an array of substrings.
The CStr function is used to convert a value to a string.
A string array in VBA can be created by using Dim as follows:
So, how to include double quotes in your strings? The answer is using Chr() function with 34 code.
Chr is a Text function in Excel that we may use in the VBA.
VBA Replace function is used to replace a given substring (expression) in the source string.
The ClearContents is an Excel function that can be used in VBA to remove values and formulas in range.
The Excel/VBA InStrRev function (In String Reverse), is just like the InStr function except for it searches the given term from the end of given string.
The Excel SUM function can be used in VBA by WorksheetFunction object.
IsNumeric is the VBA function that you may use directly. IsNumber is the Excel function that you may use in VBA. However, you have to use this with Application.WorksheetFunction object.
The COUNTIF is an Excel function that you may use in VBA as well. For that, you may use the WorksheetFunction object’s CountIf method.
The Max() is WorksheetFunction that you may use in the VBA coding to get the maximum number.
It takes up to thirty arguments i.e.
To get the remainder of a division, you may use the Excel/VBA Mod operator.
UBound and LBound are array functions in VBA. Let us look at these, one by one.