VBA Functions

VBA Excel Functions List by Category in Excel

VBA Excel Functions are most important which are used while writing procedures or macros. We have list of Functions in Excel VBA. These functions are built in functions. We can also write user defined functions as per our requirements. We have different categories of functions.

Those are VBA Date and Time Functions, VBA Text/String Functions, VBA Information Functions, VBA Logical Functions, VBA File and Directory Functions, VBA Math and Trig Functions, VBA Financial Functions and VBA Lookup and Reference Functions. Each category has list of functions to deal with different type of data. In this tutorial all functions are explained with syntax and multiple examples.

Here are the different categories and list of all VBA Excel Functions.

VBA Date & Time Functions:

Here are the list of VBA Date and Time Functions.

Function Name Description
VBA Date VBA Date function returns current system date.
VBA DateAdd VBA DateAdd function returns a date after which a certain time or date interval has been added.
VBA DateDiff VBA DateDiff function returns the difference between two date values, based on the interval specified.
VBA DatePart VBA DatePart function returns a specified part of a supplied date or time
VBA DateSerial VBA DateSerial function returns a date value from a supplied year, month and day.
VBA DateValue VBA DateValue function returns the date value for specified string input.
VBA Day VBA Day function returns day from date.
VBA Hour VBA Hour function returns hour from time.
VBA Minute VBA Minute function returns Minute from time.
VBA Month VBA Month function returns month from date.
VBA MonthName VBA MonthName function returns a string representing the month given a number from 1 to 12.
VBA Now VBA Now function returns system date and time.
VBA Time VBA Time function returns current system time.
VBA TimeSerial VBA TimeSerial function returns time.
VBA TimeValue VBA TimeValue function returns the date value for specified input represents date.
VBA Weekday VBA Weekday function returns a number representing the day of the week, given a date value.
VBA WeekdayName VBA WeekdayName function returns a string representing the day of the week given a number from 1 to 7.
VBA Year VBA Year function returns year from date.

Click on the following link for quick reference of VBA Date & Time functions.

VBA Date & Time Functions

VBA Projects with Source Code

Help Desk Management System

Help Desk Management System is an Excel VBA Project with Full Source Code, realtime VBA Project to Manage Help desk Tickets. Explore the Code and Professional VBA Applications.

View Details

Ultimate TOC Builder

Ultimate TOC Builder is Excel VBA Project with Source Code. Real-time VBA Project to Create TOC. Explore the Code to Build Professional VBA Applications.

View Details

  • Real time VBA Projects
  • Access to Full VBA Source Code
  • Well commented Code

VBA Text/String Functions:

Here are the list of VBA Text/String Functions.

Function Name Description
VBA Asc VBA ASC function returns the ASCII value of the first character from a string.
VBA Chr VBA Chr function returns a character of the ASCII value.
VBA Format VBA Format function returns a formatted string from a string expression.
VBA InStr VBA InStr function returns the position of a substring within a string.
VBA InStrRev VBA InStrRev function returns the position of a substring within a string, searching from right to left.
VBA LCase VBA LCase function converts a string to lowercase text.
VBA Left VBA Left function returns the specified number of characters from a given string, starting from the left most character.
VBA Len VBA Len function returns the length of a given string.
VBA LTrim VBA LTrim function removes leading spaces from a given string.
VBA Mid VBA Mid function returns a specified number of characters from a specified string.
VBA Replace VBA Replace function replaces a substring with another string in a given string.
VBA Right VBA Right function returns the specified number of characters from a given string, starting from the right most character.
VBA RTrim VBA RTrim function removes trailing spaces from a given string.
VBA Space VBA Space function returns a string with a specified number of spaces.
VBA Split VBA Split function returns an array of substrings based on a delimiter.
VBA Str VBA Str function returns a string which represents a number.
VBA String VBA String function returns a string which consists of repeated characters.
VBA StrComp VBA StrComp function returns an integer value representing the result of string comparision.
VBA StrConv VBA StrConv function converts a string to a specified format(vbUpperCase, vbLowerCase, vbUnicode, vbWide, vbNarrow, vbProperCase, etc.)
VBA StrReverse VBA StrReverse function reverses a given string.
VBA Trim VBA Trim function removes leading and trailing spaces from a given string.
VBA UCase VBA UCase function converts a string to uppercase text.

Click on the following link for quick reference of VBA Text/String functions

VBA Text/String Functions

VBA Information Functions:

Here are the list of VBA Information Functions.

Function Name Description
VBA ENVIRON VBA ENVIRON function returns value of the current operating system environment variable.
VBA IsArray VBA IsArray function checks a specified variable is an array or not.
VBA IsDate VBA IsDate function checks specified Expression is date or not. It returns True if it is valid date.
VBA IsEmpty VBA IsEmpty function checks specified Expression is empty or not.
VBA IsError VBA IsError function checks specified Expression is error or not.
VBA IsMissing VBA IsMissing function checks specified an optional argument is missing or not.
VBA IsNull VBA IsNull function checks specified Expression is Null or not.
VBA IsNumeric VBA IsNumeric function checks specified Expression is Numeric or not.
VBA IsObject VBA IsObject function checks specified variable is an object or not.

Click on the following link for quick reference of VBA Information functions

VBA Information Functions

VBA File & Directory Functions:

Here are the list of VBA File & Directory Functions.

Function Name Description
VBA ChDir VBA ChDir function changes the current folder or directory.
VBA ChDrive VBA ChDrive function changes the current drive.
VBA CurDir VBA CurDir function returns the current path.
VBA Dir VBA Dir function returns the first name of a file or directory that matches a pattern.
VBA FileAttr VBA FileAttr function returns the file mode for opened files using the open statement.
VBA FileCopy VBA FileCopy function copies a file from the source directory to the destination directory.
VBA FileDateTime VBA FileDateTime function returns the date and time when a file or directory was created or last modified.
VBA FileLen VBA FileLen function returns the size / length of a file in bytes.
VBA GetAttr VBA GetAttr function returns the attributes of a file or directory.
VBA Kill VBA Kill function deletes a file based on the specified Path Name.
VBA MkDir VBA MkDir function creates a new folder or directory .
VBA Name VBA Name function moves the file to the new directory or folder.
VBA RmDir VBA RmDir function removes an existing directory or folder.
VBA SetAttr VBA SetAttr function sets the attributes of a file or directory.

Click on the following link for quick reference of VBA File & Directory functions

VBA File & Directory Functions

VBA Data Type Conversion Functions:

Here are the list of VBA Data Type Conversion Functions.

Function Name Description
VBA CBool VBA CBool function converts an expression to a Boolean data type.
VBA CByte VBA CByte function converts an expression to a Byte data type.
VBA CCur VBA CCur function converts an expression to a Currency data type.
VBA CDate VBA CDate function converts an expression to a Date data type.
VBA CDbl VBA CDbl function converts an expression to a Double data type.
VBA CDec VBA CDec function converts an expression to a Decimal data subtype.
VBA CInt VBA CInt function converts an expression to an Integer data type.
VBA CLng VBA CLng function converts an expression to a Long data type.
VBA CSng VBA CSng function converts an expression to a Single data type.
VBA CStr VBA CStr function converts an expression to a String data type.
VBA CVar VBA CVar function converts an expression to a Variant data type.

Click on the following link for quick reference of VBA Data Type Conversion functions

VBA Data Type Conversion Functions

VBA Projects with Source Code

Help Desk Management System

Help Desk Management System is an Excel VBA Project with Full Source Code, realtime VBA Project to Manage Help desk Tickets. Explore the Code and Professional VBA Applications.

View Details

Ultimate TOC Builder

Ultimate TOC Builder is Excel VBA Project with Source Code. Real-time VBA Project to Create TOC. Explore the Code to Build Professional VBA Applications.

View Details

  • Real time VBA Projects
  • Access to Full VBA Source Code
  • Well commented Code

VBA Logical Functions:

Here are the list of VBA Logical Functions.

Function Name Description
VBA AND VBA AND function returns true, if all the conditions are TRUE.
VBA OR VBA OR function returns TRUE, if any one condition is TRUE.
VBA NOT VBA Not function returns TRUE, if a condition is False. It returns False, if condition is TRUE.

Click on the following link for quick reference of VBA Logical functions

VBA Logical Functions

VBA Math(Mathematical) & Trig Functions:

Here are the list of VBA Math(Mathematical) & Trig Functions.

Function Name Description
VBA Abs VBA Abs function converts a value to an absolute number.
VBA Atn VBA Atn function returns the arctangent of a number in radians, not degrees.
VBA Cos VBA Cos function returns the cosine value of an angle in radians.
VBA Exp VBA Exp function returns an exponential value for a specified number.
VBA Fix VBA Fix returns the integer portion of a number.
VBA FormatNumber VBA FormatNumber function converts the given expression as formatted number.
VBA FormatCurrency VBA FormatCurrency function converts the given expression as formatted currency.
VBA FormatPercent VBA FormatPercent function converts the given expression as formatted percentage.
VBA Int VBA Int function rounds a specified number down to an integer.
VBA Log VBA Log function returns the natural logarithm of a specified number.
VBA Randomize VBA Randomize function changes the number in RND function which is used for random number generator.
VBA Rnd VBA Rnd function returns random number between 0 and 1.
VBA Round VBA Round function rounds a number to a specified number of decimal digits.
VBA Sgn VBA Sgn function returns the sign of a number.
VBA Sin VBA Sin function returns the sine value of an angle in radians.
VBA Tan VBA Tan function returns the tangent value of an angle.
VBA Sqr VBA Sqr function returns the square root of a number.

Click on the following link for quick reference of VBA Math(Mathematical) & Trig functions

VBA Math(Mathematical) & Trig Functions

VBA Financial Functions:

Here are the list of VBA Financial Functions.

Function Name Description
VBA DDB VBA DDB calculates the future value of an asset over a specified period of time.
VBA FV VBA FV function calculates the future value of an annuity.
VBA IPmt VBA IPmt function calculates the interest part of a payment in a specific period of regular interval time.
VBA IRR VBA IRR function calculates the interest rate of return for a series of unequal cash flows at regular intervals.
VBA MIRR VBA MIRR function calculates the modified interest rate of return for a series of unequal cash flows at regular intervals.
VBA NPer VBA NPer function calculates the number of periods for an annuity.
VBA NPV VBA NPV function calculates the net present value of an annuity.
VBA Pmt VBA Pmt function calculates the number of periodic payments of an annuity.
VBA PPmt VBA PPmt function calculates the principal amount paid in a specific period for an annuity.
VBA PV VBA PV function calculates the present value of an annuity.
VBA Rate VBA Rate function calculates the interest rate per payment period of an annuity.
VBA SLN VBA SLN function calculates the straight line depreciation of an asset for a single period of time.
VBA SYD VBA SYD function calculates the sum of years’ digits depreciation of an asset for a specific period of time.

Click on the following link for quick reference of VBA Financial functions

VBA Financial Functions

Instructions to Run VBA Macro Code or Procedure:

You can refer the following link for the step by step instructions.

Instructions to run VBA Macro Code

Other Useful Resources:

Click on the following links of the useful resources. These helps to learn and gain more knowledge.

VBA Tutorial VBA Functions List VBA Arrays in Excel Blog

VBA Editor Keyboard Shortcut Keys List VBA Interview Questions & Answers

Leave a Reply