Page 279 - Excel Data Analysis
P. 279
15 537547 AppC.qxd 3/4/03 11:56 AM Page 265
VBA AND EXCEL EVENTS QUICK REFERENCE C
VBA FUNCTION QUICK REFERENCE (CONTINUED)
Mathematical Functions (Continued)
FUNCTION DESCRIPTION RESULTS
Exp(number) Returns the base of the natural logarithms raised Double
to a power.
Fix(number) Returns the integer portion of a number. With Integer
negative values, returns the first negative value
greater than or equal to the number.
Int(number) Returns the integer portion of a number. With Integer
negative values, returns the first negative number
less than or equal to the number.
Log(number) Returns the natural logarithm of a number. Double
Round(expression[, numdecimalplaces]) Rounds a number to the specified number of Mixed
decimal places.
Rnd[(number)] Returns a random number between 0 and 1. Single
Sgn(number) Returns 1 for a number greater than 0, 0 for a value of 0, Integer
and -1 for numbers less than zero.
Sin(number) Specifies the sine of an angle. Double
Sqr(number) Specifies the square root of a number. Double
Tan(number) Specifies the tangent of an angle. Double
String Manipulation Functions
FUNCTION DESCRIPTION RESULTS
InStr([start,]string1, string2[, compare]) Specifies the position of one string within Long
another string.
InStrRev(stringcheck, stringmatch[, Specifies the position of one string within another Long
start[, compare]]) starting at the end of the string.
LCase(string) Converts a string to lowercase. String
Left(string, length) Returns the specified number of characters from String
the left side of a string.
Len(string | varname) Determines the number of characters in a string. Long
LTrim(string) Trims spaces from the left side of a string. String
Mid(string, start[,length]) Returns the specified number of characters from String
the center of a string.
Right(string, length) Returns the specified number of characters from String
the right side of a string.
RTrim(string) Trims spaces from the right side of a string. String
Space(number) Creates a string with the specified number of spaces. String
265