Question: Joe Schmoe, a Texas A&M graduate, was tasked with coding an VBA function with the following properties. The function: * Is named Calc _ Rate
Joe Schmoe, a Texas A&M graduate, was tasked with coding an VBA function with the following properties. The function: Is named CalcRate Accepts three arguments and returns a rate The first argument stores an annual rate APR The second argument stores a m value to indicate compounding frequency The third argument stores an indicator The function computes then returns a rate based on the following logic: If the indicator is the letter E then the function should return the Effective Annual Rate EAR APR m m If the indicator is the letter P then the function should return the periodic rate APR m If the indicator is other than the letter E or P then the function should return the numeric error code HOWEVER, Joe has created the function code listed in column J but the code is NOT working correctly. Your tasks are: Insert a module in the VBA editor. Copy the code from column J J:J and paste into the code window in the module you just inserted in the VBA editor In the VBA editor, correct the function code so that it executes without error AND completes the tasks as specified above. Once the code is corrected, call the CalcRate function from cell E and pass in the exam information in cells B C and D as relative cell arguments separated by commas. Copy the function call from cell E to E:E Copy your subroutine code from the VBA editor and paste the code starting in cell B Copy from the worksheet area starting in cell B and paste into column G lines of code that match the description provided in column F
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
