VBA Functions

VBA Functions - VBA Functions Math functions Abs Absolute...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
VBA Functions Math functions Abs Absolute value Abs(-5) 5 Sqr Square root Sqr(25) 5 Mod Modular 15 Mod 12 3 Int Integer value Int(3.8) 3 , Int(-3.1) -4 Rnd Random number Exp e^x Exp(1) 2.718282 Log Natural log (base e) Log(2.718282) 1 Sin, Cos, Tan, Atn Sine, Cosine, Tangent, and Arctangent of angle in radians Type Conversion functions CInt Rounds to an integer (the assignment statement is a rounding operation) CLng Rounds to a long (the assignment statement is a rounding operation) CDbl Converts to a double CStr Converts to a string CDate Converts to a date Asc Takes a single character and returns its ASCII equivalent Asc(“A”) 65 Chr Takes an ASCII integer and gives its character Chr(65) “A” String functions UCase returns a string in all upper case characters UCase(“Here”) HERE LCase returns a string in all lower case characters L Case(“Here”) here Left extracts string Left (“here is a string”, 6) here i
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

VBA Functions - VBA Functions Math functions Abs Absolute...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online