of 30
7/30/2019 Appendix C Excel and VBA Built-In Functions
1/30
Function
Worksheet FunACCRINT
ACCRINTM
COUPDAYSBS
COUPDAYS
COUPDAYSNC
COUPONCD
COUPNUM
COUPPCD
CUMIPMT
CUMPRINC
DB
DDB#
DISC
DOLLARDE
DOLLARFR
DURATION
EFFECT
FV#
FVSCHEDULE
INTRATE
IPMT#
IRR#
ISPMT
MDURATION
7/30/2019 Appendix C Excel and VBA Built-In Functions
2/30
MIRR#
NOMINAL
NPER#NPV#
ODDFPRICE
ODDFYIELD
ODDLPRICE
ODDLYIELD
PMT#
PPMT#
PRICE
PRICEDISC
PRICEMAT
PV#
RATE#
RECEIVED
SLN
SYD#
TBILLEQ
TBILLPRICE
TBILLYIELD
VDB
XIRR
XNPV
YIELD
YIELDDISC
YIELDMAT
# In VBA must use a
7/30/2019 Appendix C Excel and VBA Built-In Functions
3/30
Financial Functions
What it does
ctionsReturns the accrued interest for a security that pays periodic interest
Returns the accrued interest for a security that pays interest at maturity
Returns the number of days from the (notional) coupon date preceding the issuance of a security
to the settlement date
Returns the number of days in the coupon period that contains the settlement date (i.e., the first
coupon period) for a security
Returns the number of days from the settlement date to the next coupon date
Returns the next coupon date after the settlement date
Returns the number of coupons payable between the settlement date and maturity
Returns the coupon date preceding the settlement date
Returns the cumulative interest paid on an amortizing loan between two specified dates
Returns the cumulative principal repaid on an amortizing loan between two specified dates
Returns the depreciation of an asset for a specified period using the fixed-declining balance
Returns the depreciation of an asset for a specified period using the double-declining balance
method or a faster or slower depreciation rate specified
Returns the annualized discount yield (not compounded) on a security traded on a discount basis
Converts the dollar price expressed as a fraction into a dollar price expressed as a decimal number
Converts the dollar price expressed as a decimal number into a dollar price expressed as a fraction
Returns the Macauley duration for a coupon-paying security
Returns the effective annual interest rate given the nominal annual interest rate and the number
of compounding periods per year
Returns the future value of a constant annuity
Returns the future value of an initial principal after applying a series of specified periodic interest
Returns the interest rate (not compounded) on a security with no (remaining) coupon
Returns the interest payment for a specified period of an annuity
Returns the internal rate of return for a series of cash flows that occur at equal intervals but are
not necessarily equal
Returns the interest paid during a specific period of an investment
Returns the modified duration for a coupon-paying security
7/30/2019 Appendix C Excel and VBA Built-In Functions
4/30
Returns the modified internal rate of return for a series of cash flows that occur at equal intervals
but are not necessarily equal
Returns the nominal annual interest rate given the effective annual interest rate and the number
of compounding periods per year
Returns the number of periods for an annuityReturns the present value of a series of unequal future cash flows that occur at equal intervals
starting one period in the future
Returns the price per $100 face value of a security having an odd (short or long) first period
Returns the yield of a security that has an odd (short or long) first period
Returns the price per $100 face value of a security having an odd (short or long) last coupon
Returns the yield of a security that has an odd (short or long) last period
Returns the constant periodic payment for an annuity
Returns the total principal payment over a specific number of periods for a constant annuity
Returns the price per $100 face value of a coupon paying security at a specified yield
Returns the price per $100 face value of a security traded on a discount basis at a specified
discount rate
Returns the price per $100 face value of a security that pays interest at maturity given its annual
Returns the present value of a constant annuity
Returns the interest rate per period for a constant annuity
Returns the amount received at maturity for a security traded on a discount basis
Returns the straight-line depreciation per period of an asset
Returns the sum-of-years' digits depreciation of an asset for a specified period
Returns the bond-equivalent yield for a Treasury bill
Returns the price per $100 face value for a Treasury bill
Returns the annualized (not compounded) discount yield for a Treasury bill
Returns the depreciation for any specified number of periods using the double-declining balance
method or other specified faster or slower depreciation rate
Returns the internal rate of return for a series of cash flows that are not necessarily equal or
Returns the present value of a series of cash flows that are not necessarily equal or periodic
Returns the yield on a security that pays periodic interest
Returns the annual yield for a discounted security
Returns the annual yield of a security that pays interest at maturity
vailable equivalent function by the same name
7/30/2019 Appendix C Excel and VBA Built-In Functions
5/30
Function
Worksheet FunAVEDEV
AVERAGE
AVERAGEA
CHIDIST
CHINV
CHITEST
CONFIDENCE
CORREL
COUNT
COUNTA
COUNTBLANK
COUNTIF
COVAR
DEVSQ
EXPONDIST
FDIST
FINV
FORECAST
FREQUENCY
FTEST
GEOMEAN
GROWTH
INTERCEPT
KURT
LARGE
LINEST
LOGINV
LOGNORMDIST
7/30/2019 Appendix C Excel and VBA Built-In Functions
6/30
MAX
MAXA
MEDIAN
MIN
MINA
MODE
NORMDIST
NORMINV
NORMSDIST
NORMSINV
PERCENTILE
PERCENTRANK
PERMUT
POISSON
PROB
QUARTILE
RANK
SKEW
SLOPE
SMALL
STANDARDIZE
STDEV
STDEVA
STDEVP
STDEVPA
STEYX
TDIST
TINV
TREND
7/30/2019 Appendix C Excel and VBA Built-In Functions
7/30
TTEST
VAR
VARA
VARP
VARPA
7/30/2019 Appendix C Excel and VBA Built-In Functions
8/30
Statistical Functions
What it does
ctionsReturns the average of the absolute deviations of the data points from the mean
Returns the arithmatic average of the arguments that are numbers
Returns the arithmatic average of the arguments including texts, logical values in special ways
Returns the one-tailed probability of the chi-squared distribution
Returns the inverse of the one-tailed probability of the chi-squared distribution
Returns the value from the chi-squared distribution for the test for independence
Returns the confidence interval for a population mean
Returns the correlation coefficient between two data sets
Counts how many numbers are in the list of arguments
Counts how many values (including logical values, texts, and error values) are in the list of
Counts the number of blank cells in the argument range
Counts the number of cells that meet the criteria specified in the argument
Returns the covariance of a set of data point pairs
Returns the sum of squares of deviations of data points from the simple mean
Returns the exponential distribution
Returns the F probability distribution
Returns the inverse of the F probability distribution
Predicts a future value based on known pairs of values using linear regression
Returns the frequency distribution (by specified baskets) for a set of data
Returns the result of an F-test
Returns the geometric mean
Returns predictions based on an exponential trend
Returns the intercept of a linear regression line
Returns the kurtosis of a data set
Returns the k-th (specified) largest value in a data set
Returns the parameters and detailed statistics for a linear regression
Returns the inverse of the lognormal distribution
Returns the cumulative lognormal distribution
7/30/2019 Appendix C Excel and VBA Built-In Functions
9/30
Returns the maximum value in a list of arguments ignoring logical values and texts
Returns the maximum value in a list of arguments including logical values (TRUE=1 and FALSE=0)
and texts (=0)
Returns the median of the given numbers
Returns the minimum value in a list of arguments ignoring logical values and texts
Returns the minimum value in a list of arguments including logical values (TRUE=1 and FALSE=0)
and texts (=0)
Returns the mode (most frequently occurring value) in a given data set
Returns the cumulative normal distribution for the specified mean and standard distribution
Returns the inverse of the cumulative normal distribution for the specified mean and standard
Returns the cumulative standard normal distribution
Returns the inverse of the cumulative standard normal distribution
Returns the k-th percentile of values in a range
Returns the percentage rank of a value in a data set
Returns the number of permutations for a given number of objects that can be selected from the
total ob ectsReturns the poisson distribution
Returns the probability that values in a range are between two limits
Returns the quartile of a data set
Returns the rank of a numbers in a list of numbers
Returns the skewness of a distribution
Returns the slope of a linear regression line through a set of data points
Returns the k-th smallest value in a data set
Returns the normalized value from a distribution given its mean and standard deviation
Returns the estimate of population standard deviation based on a sample, ignoring text and logical
values
Returns the estimate of population standard deviation based on a sample, including text (=0) and
logical values (TRUE=1, FALSE=0)
Returns the sample standard deviation of a set of data, ignoring text and logical values
Returns the sample standard deviation of a data set, including text (=0) and logical values(TRUE=1, FALSE=0)
Returns the standard error of the predicted y-values for each x in a regression
Returns the probability for the Student's t-distribution
Returns the inverse of the Student's t-distribution
Returns the value along a linear trend line
7/30/2019 Appendix C Excel and VBA Built-In Functions
10/30
Returns the probability associated with a Student's t-test
Returns the estimate of population variance based on a sample, ignoring text and logical values
Returns the estimate of population variance based on a sample, including text (=0) and logical
values (TRUE=1, FALSE=0)
Returns the sample variance of a set of data, ignoring text and logical values
Returns the sample variance of a data set, including text (=0) and logical values (TRUE=1,
7/30/2019 Appendix C Excel and VBA Built-In Functions
11/30
Function
Worksheet FunABS #
CEILING
COMBIN
EVEN
EXP #
FACT
FLOOR
INT
LN
LOG
LOG10
MOD
MROUND
ODD
PI
POWER
PRODUCT
QUOTIENT
RAND
RANDBETWEEN
ROUND #
ROUNDDOWN
ROUNDUP
SIGN
SQRT
SUM
SUMIF
SUMSQ
7/30/2019 Appendix C Excel and VBA Built-In Functions
12/30
TRUNC
VBA Functions
Fix
Int
Log
Rnd
Sgn
Sqr
# In VBA must use a
7/30/2019 Appendix C Excel and VBA Built-In Functions
13/30
Mathematical Functions
What it does
ctionsReturns the absolute value of a number
Returns a number rounded away from zero to the nearest multiple of a specified number
Returns the possible number of combinations for a given number of items
Returns a number rounded to the nearest even integer away from zero
Returns e raised to a power
Returns the factorial of a number
Returns a number rounded towards zero to the nearest multiple of a specified number
Rounds a number down to the nearest integer
Returns the natural logarithm of a number
Returns the logarithm of a number to the base specified
Returns the base-10 logarithm of a number
Returns the remainder after a number is divided by a specified divisor
Returns a number rounded up or down to the nearest multiple of a specified number
Returns a number rounded to the nearest odd integer away from zero
Returns the value of pi
Returns the result of a number raised to a specified power
Multiplies all the numbers given as arguments and returns the result
Returns the integer portion of the result of a division
Returns a random draw from a uniform distribution between 0 and 1 (both included)
Returns a random draw from a uniform distribution between two specified numbers
Rounds a number to a specified number of digits
Returns a number rounded toward zero to a specified number of digits
Returns a number rounded away from zero to a specified number of digits
Returns the sign of a number: 1 for positive, 0 for 0, and -1 for negative
Returns the positive square root of a number
Returns the sum of its arguments
ums t e va ues n ce s n a range se ecte y app y ng a spec e cr ter a to a para e set o
Returns the sum of the squares of its arguments
7/30/2019 Appendix C Excel and VBA Built-In Functions
14/30
Truncates a number to a specified number of decimal points by removing the rest
Returns the integer portion of a number (differs from Int function for negative numbers)
Returns the integer portion of a number (differs from Fix function for negative numbers)
Returns the natural logarithm of a number
Returns a random draw from a uniform distribution between 0 and 1 (both included)
Returns the sign of a number: 1 for positive, 0 for 0, and -1 for negative
Returns the square root of a number
vailable equivalent function by the same name
7/30/2019 Appendix C Excel and VBA Built-In Functions
15/30
Function
Worksheet FunADDRESS
CHOOSE #
COLUMN
COLUMNS
GETPIVOTDATA
HLOOKUP
INDEX
INDIRECT
LOOKUP
MATCH
OFFSET
ROW
ROWS
TRANSPOSE
VLOOKUP
# In VBA must use a
7/30/2019 Appendix C Excel and VBA Built-In Functions
16/30
Lookup and Reference Functions
What it does
ctionsCreates a cell address as text given row and column numbers
Based on a specified index number (1st, 2nd, etc.) chooses a value from the list of its value
Returns the column number of the specified reference
Returns the number of columns in an array or reference
Retrieves specified data from a PivotTable report
Searches for a value in the top row of a table or an array of values, and then returns the value
from a specified row in the same column of the table or array
Returns the value or reference to the value of the specified row and column of a table or range
Returns the contents of a reference (after any necessary evaluation) specified by a text string
Looks in a one-row or one-column range for a value and returns a value from the same position in
a second one-row or one-column range
Returns the relative position of an item in a range of contiguous cells in a row or a column that
matches a specified value
Returns the reference to a single cell or a range of cells that is a specified number of rows and
columns from a cell or range of cells
Returns the row number of the specified reference
Returns the number of rows in an array or reference
Transposes an array (as defined in matrix algebra) so that the first row becomes the first column,
Searches for a value in the leftmost column of a table or an array of values, and then returns the
value from a specified column in the same row of the table or array
vailable equivalent function by the same name
7/30/2019 Appendix C Excel and VBA Built-In Functions
17/30
Function
Worksheet FunDATE
DATEVALUE
DAY#
DAYS360
EDATE
EOMONTH
HOUR#
MINUTE#
MONTH#
NETWORKDAYS
NOW#
SECOND#
TIME
TIMEVALUE
TODAY
WEEKDAY#
WEEKNUM
WORKDAY
YEAR#
YEARFRAC
VBA Functions
Date
DateAdd
DateDiff
DatePart
7/30/2019 Appendix C Excel and VBA Built-In Functions
18/30
DateSerial
DateValue
MonthName
Time
TiemSerial
TimeValue
WeekdayName
# In VBA must use a
7/30/2019 Appendix C Excel and VBA Built-In Functions
19/30
Date and Time Functions
What it does
ctionsReturns the serial number of a date specified by year, month, and date as separate arguments
Returns the serial number of a date specified as a text (that is, in quotations) in one of Excel's
date formats
Returns the day of month of a date given as a serial number or a text in one of Excel's date
Returns the number of days between two dates specified in Excel formats or as serial numbers,
based on a 360 day year
Returns the serial number of the date that is a specified number of months before or after the
Returns the serial number of the last day of the month that is a specified number of months before
or after a specified date
Returns the hour of a time value
Returns the minutes of a time value
Returns the month of a date value
Returns the number of whole working days between two specified date values.
Returns the serial number of the current date and time
Returns the seconds of a time value
Returns the decimal number for time entered as hour, minute, and seconds separated by commas
Returns the decimal number of a time specified by a text string
Returns the serial number of current date
Returns an integer indicating the day of the week for a date
Returns a number that indicates where the week of a specified date falls numerically within a year
Returns the serial number of the date that is a specified number of workdays before or after a date
Returns the year of a date
Returns the number of years and fraction of years between two specified dates
Returns the current system date
Adds a specified time interval to a date
Returns the time interval between two dates
Returns a specified part of a date
7/30/2019 Appendix C Excel and VBA Built-In Functions
20/30
Returns a Variant (Date) for a specified year, month, and day
Converts a string expression to a date
Returns the month name as a string given a month number
Returns the current system time
Returns a Variant (Date) containing the time for a specified hour, minute and second
Returns a variant containing the time
Returns the name of the day of the week for a date
vailable equivalent function by the same name
7/30/2019 Appendix C Excel and VBA Built-In Functions
21/30
Function
Worksheet FunCONCATENATE
EXACT
FIND
FIXED
LEFT#
LEN#
LOWER
MID#
PROPER
REPLACE#
REPT
RIGHT#
SEARCH
SUBSTITUTE
TEXT
TRIM#
UPPER
VALUE
VBA Functions
InStr
InStrRev
LCase
LTrim
RTrim
Space
Str
7/30/2019 Appendix C Excel and VBA Built-In Functions
22/30
StrComp
StrConv
String
StrReverse
UCase
# In VBA must use a
7/30/2019 Appendix C Excel and VBA Built-In Functions
23/30
Text Functions
What it does
ctionsJoins several text strings into one text string
Checks whether two text strings are identical (case-sensitive) and returns TRUE or FALSE
Finds and returns the position of one text string within another (case-sensitive)
Returns a number as a text string after formatting it with a specified number of decimals
Returns a specified number of characters from the beginning of a text string
Returns the number of characters in a text string
Converts all uppercase letters in a text string to lowercase
Returns a specified number of characters from a text string, starting at a specified position
Capitalizes the first letter of each word in a text string and converts all other letters to lowercase
letters
Replaces a specific number of characters at a specific position in a text string with a new text
string (of any length)
Creates a new text string by repeating a given text string a specified number of times
Returns a specified number of characters from the end of a text string
Finds and returns the position of one text string within another (not case-sensitive)
Substitutes new text for specific old text in a text string
Converts a value to text in a specified number format
Removes all extra spaces from a text string except for single spaces between words
Converts text to uppercase
Converts a text string that represents a number to a number
Returns the position of a string within another string
Returns the position of a string within another string, from the end of the string
Returns a string converted to lowercase
Returns a copy of a string with no leading spaces
Returns a copy of a string with no trailing spaces
Returns a string with a specified number of spaces
Returns the string representation of a number
7/30/2019 Appendix C Excel and VBA Built-In Functions
24/30
Returns a value indicating the result of a string comparison
Returns a string converted as specified
Returns a string containing repeating character strings of the length specified
Returns a string, reversed
Converts a string to uppercase
vailable equivalent function by the same name
7/30/2019 Appendix C Excel and VBA Built-In Functions
25/30
Function
Worksheet FunAND
FALSE
IF
NOT
OR
TRUE
VBA Functions
IIF
Xor
7/30/2019 Appendix C Excel and VBA Built-In Functions
26/30
Logical Functions
What it does
ctionsReturns TRUE if all its arguments are TRUE; otherwise returns FALSE
Returns the logical value FALSE
Returns one value if a specified condition evaluates to TRUE and another value if it evaluates to
Reverses the logical value of its argument
Returns TRUE if any one of its arguments is TRUE; otherwise returns FALSE
Returns the logical value TRUE
Returns one of two parts, depending on the evaluation of an expression
Performs a logical exclusion on two expressions and returns True if one and only one of them is
7/30/2019 Appendix C Excel and VBA Built-In Functions
27/30
Function
Worksheet FunCELL
ISBLANK
ISERR
ISERROR
ISEVEN
ISLOGICAL
ISNA
ISNONTEXT
ISNUMBER
ISODD
ISREF
ISTEXT
N
TYPE
VBA Functions
Array
CCur
CDate
CDbl
CDec
CInt
CLng
CSng
CStr
CurDir
CVar
Format
7/30/2019 Appendix C Excel and VBA Built-In Functions
28/30
InputBox
IsArray
IsDate
IsEmpty
IsError
IsMissing
IsNull
IsNumeric
LBound
MsgBox
TypeName
UBound
VarType
7/30/2019 Appendix C Excel and VBA Built-In Functions
29/30
Information and Miscellaneous Functions
What it does
ctionsReturns information about the formatting, location, or contents of a cell
Returns TRUE if a cell referred to is empty
Returns TRUE if the value is any error value except #N/A!
Returns TRUE if the value is any error value
Returns TRUE if the number is even
Returns TRUE if the value is a logical value
Returns TRUE if the value is the error value #N/A!
Returns TRUE if the value is not text
Returns TRUE if the value is a number
Returns TRUE if the number is odd
Returns TRUE if the value is a reference
Returns TRUE if the value is text
Converts a value to a number based on a set of rules
Returns a number indicating the type of a value
Returns a variant containing an array
Converts an expression to a currency data type
Converts an expression to a date data type
Converts an expression to a double data type
Converts an expression to a decimal data type
Converts an expression to an integer data type
Converts an expression to a long data type
Converts an expression to a single data type
Converts an expression to a string data type
Returns the current path
Converts an expression to a variant data type
Displays an expression in a particular format
7/30/2019 Appendix C Excel and VBA Built-In Functions
30/30
Displays a dialog box to get user input
Returns True or False depending on whether a variable is an array
Returns True or False depending on whether a variable is a date or can be converted to a date
Returns True or False depending on whether a variable has been initialized or explicitly set to
Returns True or False depending on whether an expression is an error value
Returns True or False indicating whether an optional variant argument has been passed to a
Returns True or False depending on whether an expression contains no valid data (null)
Returns True or False depending on whether an expression can be evaluated as a number
Returns the smallest subscript for a dimension of an array
Displays a dialog box with a message
Returns a string that describes the data type of a variable
Returns the largest available subscript for a dimension of an array
Returns an integer indicating the subtype of a variable