I’m trying to get the Standard Deviations but in order for me to do this I need to skip over months that have a “false” or “zero” in the cell. I’m using a VBA Script to get my Standard Deviation, but if there is a better way, please let me know that also.

The script I’m using takes 6 months into account. Then calculates the Standard Deviation.

I’m hoping someone can help me fix the code below to skip fields that have “false” or a “zero”

VBA Script I’m using:
 Public Function GetXLStDev(No1 As Double, No2 As Double, No3 As Double, No4 As Double, No5 As Double, No6 As Double) As Double
   Dim objExcel As Object
   Set objExcel = CreateObject("Excel.Application")
   Let GetXLStDev = objExcel.StDev(No1, No2, No3, No4, No5, No6)
   Set objExcel = Nothing
End Function

Public Function Pause(PauseSeconds As Double)

Dim Start
Start = Timer
Do While Timer < Start + PauseSeconds

End Function