totn Excel Functions

MS Excel: VBA Functions - Listed Alphabetically

Learn how to use all Excel VBA functions used in Macros. VBA functions are built-in functions that are used in Excel's programming environment called Visual Basic for Applications (VBA).

Below is a list of Excel VBA functions sorted alphabetically. If you would like a list of these functions sorted by category, click on the following button:

Sort By Category


(Enter a value in the field above to quickly find functions in the list below)

Alphabetical Listing of VBA Functions

ABS (VBA)Returns the absolute value of a number
AND (VBA)Returns TRUE if all conditions are TRUE
ASC (VBA)Returns ASCII value of a character
ATN (VBA)Returns the arctangent of a number
CASE (VBA)Has the functionality of an IF-THEN-ELSE statement
CBOOL (VBA)Converts a value to a boolean
CBYTE (VBA)Converts a value to a byte (ie: number between 0 and 255)
CCUR (VBA)Converts a value to currency
CDATE (VBA)Converts a value to a date
CDBL (VBA)Converts a value to a double
CDEC (VBA)Converts a value to a decimal number
CHDIR (VBA)Used to change the current directory or folder
CHDRIVE (VBA)Used to change the current drive
CHOOSE (VBA)Returns a value from a list of values based on a given position
CHR (VBA)Returns the character based on the ASCII value
CINT (VBA)Converts a value to an integer
CLNG (VBA)Converts a value to a long integer
CONCATENATE with & (VBA)Used to join 2 or more strings together using the & operator
COS (VBA)Returns the cosine of an angle
CSNG (VBA)Converts a value to a single-precision number
CSTR (VBA)Converts a value to a string
CURDIR (VBA)Returns the current path
CVAR (VBA)Converts a value to a variant
DATE (VBA)Returns the current system date
DATEADD (VBA)Returns a date after which a certain time/date interval has been added
DATEDIFF (VBA)Returns the difference between two date values, based on the interval specified
DATEPART (VBA)Returns a specified part of a given date
DATESERIAL (VBA)Returns a date given a year, month, and day value
DATEVALUE (VBA)Returns the serial number of a date
DAY (VBA)Returns the day of the month (a number from 1 to 31) given a date value
DDB (VBA)Returns the depreciation of an asset based on the double-declining balance method
DIR (VBA)Returns the first filename that matches the pathname and attributes specified
ENVIRON (VBA)Returns the value of an operating system environment variable
EXP (VBA)Returns e raised to the nth power
FILEDATETIME (VBA)Returns the date and time of when a file was created or last modified
FILELEN (VBA)Returns the size of a file in bytes
FIX (VBA)Returns the integer portion of a number
FOR...NEXT (VBA)Used to create a FOR LOOP
FORMAT DATES (VBA)Takes a date expression and returns it as a formatted string
FORMAT NUMBERS (VBA)Takes a numeric expression and returns it as a formatted string
FORMAT STRINGS (VBA)Takes a string expression and returns it as a formatted string
FV (VBA)Returns the future value of an investment
GETATTR (VBA)Returns an integer that represents the attributes of a file, folder, or directory
HOUR (VBA)Returns the hours (a number from 0 to 23) from a time value
IF-THEN-ELSE (VBA)Returns a value if a specified condition evaluates to TRUE or another value if it evaluates to FALSE
INSTR (VBA)Returns the position of the first occurrence of a substring in a string
INSTRREV (VBA)Returns the position of the first occurrence of a string in another string, starting from the end of the string
INT (VBA)Returns the integer portion of a number
IPMT (VBA)Returns the interest payment for an investment
IRR (VBA)Returns the internal rate of return for a series of cash flows
ISDATE (VBA)Returns TRUE if the expression is a valid date
ISEMPTY (VBA)Used to check for blank cells or uninitialized variables
ISERROR (VBA)Used to check for error values
ISNULL (VBA)Used to check for a NULL value
ISNUMERIC (VBA)Used to check for a numeric value
LCASE (VBA)Converts a string to lowercase
LEFT (VBA)Extract a substring from a string, starting from the left-most character
LEN (VBA)Returns the length of the specified string
LOG (VBA)Returns the natural logarithm of a number
LTRIM (VBA)Removes leading spaces from a string
MID (VBA)Extracts a substring from a string (starting at any position)
MINUTE (VBA)Returns the minutes (a number from 0 to 59) from a time value
MIRR (VBA)Returns the modified internal rate of return for a series of cash flows
MKDIR (VBA)Used to create a new folder or directory
MOD (VBA)Returns the remainder after a number is divided by a divisor
MONTH (VBA)Returns the month (a number from 1 to 12) given a date value
MONTHNAME (VBA)Returns a string representing the month given a number from 1 to 12
NOW (VBA)Returns the current system date and time
NPER (VBA)Returns the number of periods for an investment
NPV (VBA)Returns the net present value of an investment
OR (VBA)Returns TRUE if any of the conditions are TRUE
PMT (VBA)Returns the payment amount for a loan
PPMT (VBA)Returns the payment on the principal for a particular payment
PV (VBA)Returns the present value of an investment
RANDOMIZE (VBA)Used to change the seed value used by the random number generator for the RND function
RATE (VBA)Returns the interest rate for an annuity
REPLACE (VBA)Replaces a sequence of characters in a string with another set of characters
RIGHT (VBA)Extracts a substring from a string starting from the right-most character
RND (VBA)Used to generate a random number (integer value)
ROUND (VBA)Returns a number rounded to a specified number of digits
RTRIM (VBA)Removes trailing spaces from a string
SETATTR (VBA)Used to set the attributes of a file
SGN (VBA)Returns the sign of a number
SIN (VBA)Returns the sine of an angle
SLN (VBA)Returns the depreciation of an asset based on the straight-line depreciation method
SPACE (VBA)Returns a string with a specified number of spaces
SPLIT (VBA)Used to split a string into substrings based on a delimiter
SQR (VBA)Returns the square root of a number
STR (VBA)Returns a string representation of a number
STRCOMP (VBA)Returns an integer value representing the result of a string comparison
STRCONV (VBA)Returns a string converted to uppercase, lowercase, proper case or Unicode
STRREVERSE (VBA)Returns a string whose characters are in reverse order
SWITCH (VBA)Evaluates a list of expressions and returns the corresponding value for the first expression in the list that is TRUE
SYD (VBA)Returns the depreciation of an asset based on the sum-of-years' digits depreciation method
TAN (VBA)Returns the tangent of an angle
TIMESERIAL (VBA)Returns a time given an hour, minute, and second value
TIMEVALUE (VBA)Returns the serial number of a time
TRIM (VBA)Returns a text value with the leading and trailing spaces removed
UCASE (VBA)Converts a string to all uppercase
VAL (VBA)Returns the numbers found in a string
WEEKDAY (VBA)Returns a number representing the day of the week, given a date value
WEEKDAYNAME (VBA)Returns a string representing the day of the week given a number from 1 to 7
WHILE...WEND (VBA)Used to create a WHILE LOOP
YEAR (VBA)Returns a four-digit year (a number from 1900 to 9999) given a date value