title: NormSInv VBA excel
body: <p>I have the following code, which keeps giving me the error "application defined or object defined error. I've actually tried a few variants of the line: WS2.Cells(i, 9) = Application.WorksheetFunction.NormSInv(Sheets("sheet2").Range(i, 7).Value) - Application.WorksheetFunction.NormSInv(Sheets("Sheet2").Range(i, 8).Value) but each one gives me a different error. Has anyone worked with this function before? </p>
  
  <p>code example: </p>
  
  <pre><code>Sub dPrime()
  Dim i As Long
  Dim WS2 As Worksheet
  Set WS2 = Worksheets("Sheet2")
  For i = 2 To Sheets("sheet2").Range("G" &amp; Rows.Count).End(xlUp).Row
       WS2.Cells(i, 9) = Application.WorksheetFunction.NormSInv(Sheets("sheet2").Range(i,     7).Value) - Application.WorksheetFunction.NormSInv(Sheets("Sheet2").Range(i, 8).Value)
  
  Next i
  End Sub
  </code></pre>
  
  <p>Data example: </p>
  
  <pre><code> 0.583333333    0.5
   0.083333333    0.75
   0.25           0.75
   0.416666667    0.75
   0.083333333    0.833333333
   0.416666667    0.75
   0.25           0.5
   0.416666667    0.833333333
   0.583333333    0.833333333
   0.25           0.9
  </code></pre>