Excel/VBA Right Function
The Right function returns specified numbers of characters from the right of the string.
It takes two arguments – both are required:
The Right function returns specified numbers of characters from the right of the string.
It takes two arguments – both are required:
PasteSpecial function in VBA Normally, as you copy/paste a cell or range of cells in…
The IIf function (capital II and small f) can be taken as a simple form of If..Then..Else statements.
The CDate function converts an expression to date type.
AutoFill is a pretty useful method in VBA that can be used to auto fill the cells in the specified range.
In VBA, you may add single line comments or block (multiple line comments) by using:
Single quote for single comment
Using the menu option for block of comments
The Weekday function returns the number of day of the Week for the given date.
VBA Date function returns the current date of the system. It can be used with the format function to get the date in the desired format. We will show this in examples.
The Or operator in VBA is used to check multiple conditions. If any of the conditions is True, the code inside the If statement executes.
The Range object in VBA has copy method that can be used to copy/paste the contents from one cell or range of cells to other cells.
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.