Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2010
    Location
    Minnesota
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Skipping a field if there is a word “FALSE”

    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:
    Code:
     Public Function GetXLStDev(No1 As Double, No2 As Double, No3 As Double, No4 As Double, No5 As Double, No6 As Double) As Double
    Code:
       Dim objExcel As Object
       Set objExcel = CreateObject("Excel.Application")
    
    
       Let GetXLStDev = objExcel.StDev(No1, No2, No3, No4, No5, No6)
    
       objExcel.Quit
       Set objExcel = Nothing
    End Function
    
    Public Function Pause(PauseSeconds As Double)
    
    Dim Start
    Start = Timer
    Do While Timer < Start + PauseSeconds
    DoEvents
    Loop
    
    End Function


    Thanks for taking the time to help me out

    TCB

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    TCB can you go into your Profile and "Enable Private Messages". I would like to send you a PM.
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Dec 2010
    Location
    Minnesota
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It has been changed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •