Question
1. Create a function in VBA that calculates the the logarithm of any number for any power. The function will be called LogarithmAnyPower and will
1. Create a function in VBA that calculates the the logarithm of any number for any power. The function will be called LogarithmAnyPower and will receive two input variables x and N. x will be the number and N the power. For example LogarithmAnyPower(81,3) = 4. Make sure to use only native vba functions when constructing your function. You are not going to use Excel functions. (1p)
2a)
You are given a 3x3 array. The numbers are placed in A1:C3 in your active worksheet.
6 7 1
11 9 2
4 10 3
A. Create a sub called FindDeterminantHard that calculates the determinant of any 3x3 matrix in A1:C3 (the sub should work and give correct answers if I change the input numbers) without the use of any Excel functions. You need to declare the array first and then you can simply calculate the determinant using the equation for its calcualation from algebra where the numbers are introduced as components of a two dimensional array. The answer should appear in a messageBox. (1p)
B. Create a sub called FindDeterminantEasy that calculates the determinant of any matrix in A1:C3 (the sub should work and give correct answers if I change the input numbers) but now you are allowed to borrow in your code Excel functions
please show your vba code thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started