Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub find()
' Activates the cell with the largest value
Dim WorkRange As Range
' Exit if a range is not selected
If TypeName(Selection) <> "Range" Then Exit Sub
' If one cell is selected, search entire worksheet;
' Otherwise, search the selected range
If Selection.Count = 1 Then
Set WorkRange = Cells
Else
Set WorkRange = Selection
End If
' Determine the average value
AverageVal = Application.Average(WorkRange)
Range("H1").Select
ActiveCell.FormulaR1C1 = AverageVal
' Determine the stdev value
StDevVal = Application.StDev(WorkRange)
Range("J1").Select
ActiveCell.FormulaR1C1 = StDevVal
' Determine the min value
MinVal = Application.Min(WorkRange)
Range("L1").Select
ActiveCell.FormulaR1C1 = MinVal
' Determine the maximum value
MaxVal = Application.Max(WorkRange)
Range("N1").Select
ActiveCell.FormulaR1C1 = MaxVal
end sub