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

Info icon This 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 Right extracts string Right(“here is a string”,7 ) string Mid extracts string Mid(“here is a string”,3,7) “re is a” Len returns the length of the string Len (“here”)
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern