Question: 1 . In the VBA Editor, insert a module ( NOT a class module ) . 2 . Insert a function; name the function Calculate
In the VBA Editor, insert a module NOT a class module Insert a function; name the function CalculateFunction In the function signature within the declare two variables with the names value and valuein this order It is not necessary to declare a variable type. Simply list the variables within the separated by a comma. For example PUBLIC FUNCTION FUNCTIONNAMEVARIABLEVARIABLE Add your name as a subroutine comment. The comment should state, Author Name: your name. Replace your name with your actual first and last name. Recall comments start with the symbol. The function return statement should calculate and return valuevalue Recall that functions return values to the worksheet using a RETURN statement. The syntax for a return statement is: FUNCTIONNAME value to be computed returned NOTE: ensure you leave a space before and after the character Call the function from cell G and pass in as argument the values in cell Gas value and Gas value This is Result Then, call the function from cell I but this time pass in the arguments in the reverse order G as value and G as value This is Result Change the value in cells G to and the value in cell G to Note how the values returned by the function in cells G and I automatically update. Copy your function code from the VBA editor and paste the code starting in cell K Below, copy from the worksheet area starting in cell K and paste into column D lines of code that match the description in column A
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
