Ciao.
Forse la soluzione è molto più banale
Codice:
Sub AnalyzeData()
Dim i As Integer
Dim LastRow As Integer
Dim avReturn As Double
Dim stDev As Double
Dim vrnc As Double
LastRow = Sheets("Data").UsedRange.Row - 2 + Sheets("Data").UsedRange.Rows.Count
Sia i che LastRow sono dichiarate Integer ( valore compreso fra -32.768 e 32.767) ma, dal momento che sono destinate a contenere un valore di riga (le righe in un foglio sono 1048576) è molto probabile che siano queste variabili a provocare l'overflow.
Prova a dichiararle come Long.