Question: Using VBA please 1. Complete this project on Sheet If you know a sphere's diameter, d, you can calculate its surface area and volume using
1. Complete this project on Sheet If you know a sphere's diameter, d, you can calculate its surface area and volume using the following formulas: Vol- d The value of pi, which is often written using the Greek symbol , is approximately 3.141592654 Input the diameter of a sphere in cell B2. Next, create a macro named SAVol that accomplishes the following tasks: Store the value of in a constant named pi using the Const statement Obtain the diameter from cell B2 and store it in a variable Calculate the surface area and output this value to cell D2 Calculate the volume and output this value to cell D3 There should be a run button on Sheet1 to execute the macro SAVol Use the Option Explicit statement for this macro. This will force you to declare your variables. Try estimating the Earth's surface area and volume using the Earth's diameter, which is approximately 7920 miles. Next, estimate the Moon's surface area and volume using the Moon's diameter, which is approximately 2160 miles
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
