Statistics Macro Assignment
Write a macro to find the number of observations, max, min, sum, average and standard deviation for a column of numbers with any number of observations starting in cell A1 and proceeding downward. The number set will be of any length and include negative, zero, and positive integers. Display the results as shown below. Use the numbers below as an example.
You may use the key board code “Selection.End(xlDown).Select” if you wish. Otherwise, use only VBA code to accomplish these tasks. No Excel functions may to be used in the spreadsheet. Name the Excel file “Statistics”, name macro “Statistics” and create a “RUN” button on the spreadsheet. Remember to dimension all variables. The macro will be graded using a different data set.
As simple as possible please
Macro Code:
Sub Statistics()
MsgBox ("Success Statistics Report")
Dim r As Range, sum As Integer, average As Double, count As
Integer, Max As Integer, Min As Integer
Set r = Sheets("Sheet1").Range("A:A")
sum = Application.WorksheetFunction.sum(r)
average = Application.WorksheetFunction.average(r)
count = Application.WorksheetFunction.count(r)
Max = Application.WorksheetFunction.Max(r)
Min = Application.WorksheetFunction.Min(r)
sd = Application.WorksheetFunction.StDev(r)
Worksheets(1).Range("G3").Value = count
Worksheets(1).Range("G6").Value = sum
Worksheets(1).Range("G7").Value = average
Worksheets(1).Range("G4").Value = Max
Worksheets(1).Range("G5").Value = Min
Worksheets(1).Range("G8").Value = sd
End Sub
Output picture:
Please give a thumbs up......
Statistics Macro Assignment Write a macro to find the number of observations, max, min, sum, aver...
Assignment • No variables declared after you start writing code, must be declared at the top. • Reuse all the variables from the first half in the second half, do not make up new variable names. • You code must be properly formatted. • You must use the code provided and variables names provided and not add any more variables to your code. • No for(int I = 0; … no declaring variables except at top of code. • You...
Please program in C++ and document the code as you go so I can understand what you did for example ///This code does~ Your help is super appreciated. Ill make sure to like and review to however the best answer needs. Overview You will revisit the program that you wrote for Assignment 2 and add functionality that you developed in Assignment 3. Some additional functionality will be added to better the reporting of the students’ scores. There will be 11...
Copy the following java codes and compile //// HighArray.java //// HighArrayApp.java Study carefully the design and implementation HighArray class and note the attributes and its methods. Create findAll method which uses linear search algorithm to return all number of occurrences of specified element. /** * find an element from array and returns all number of occurrences of the specified element, returns 0 if the element does not exit. * * @param foundElement Element to be found */ int findAll(int...