Question: Please help me with this Excel , thank you. Integer Exponent Function The exponentiation operatoris used to raise a number to a power. If the
Integer Exponent Function The exponentiation operatoris used to raise a number to a power. If the exponent is an integer>-o, there x^3 = x^n= x*x^(n-1) 1. Write a Function procedure named "IntExp" that calculates x" using a For-Next Loop instead of the exponentiation operator. Your function will accept two input arguments: n (any integer floating-point number), and will return the result 0) and x (any real 2. Your Function will validate that the integer input value is valid. a. If it is valid, your function will return the resulting floating-point value of * b. I fit is not valid, your function will return the #Value!" error code. To do that use the VBA built-in error function "CVE)"to assign the error code. That is, your function retum value will be assigned using a statement like: IntExp CVEm(xlErrValue) Here, "xlErrValue" is the VBA built-in constant that causes function "CVEr to return the error code "evalue!" Since your function returns a floating-point result in one case, and an error code in another case, it is appropriate to assign the "Variant" data type to your fiunction return value. 3. Test your function on a workshee, with two elearly labeled and named input cells for values of x and n, and one clearly labeled output cell where you will use your function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
