Why so complicated? Why first iterate through all cells, store values in an array and then iterate through the array again to calculate statistics? This is a waste of resources. The worksheet already is something like a general array.

You already have a procedure to iterate through the spreadsheet ("ReadspreadsheetRange"). Instead of copying the numbers to an array, calculate the sum (s) and count the values (n) while running through the cells. Now you know the mean = s/n. Then repeat iterating through the spreadsheet and calculate the sum of the squares (s2) of (x - mean) where x is the value found in the current cell. Finally you get the standard deviation as sqrt(s2 / (n-1)).