1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
compt =2'déclaré comme integer, comme col
H0 = 2 ' H0 déclaré comme variant
For col = 1 To 36
If IsEmpty(Workbooks("macro2").Sheets("Hpic(Dirp)").Cells(3, col)) = True Then
fun = 2
Else
m1 = Workbooks("macro2").Worksheets("hi-H0" & col).Range("AB3").Value 'quand survient le bug, m1=30,43564, m1 est déclaré comme variant
mini = Workbooks("macro2").Worksheets("hi-H0" & col).Range("AF3").Value ' mini = 30,43564 au moment du bug, mini est déclaré comme variant
mu = Workbooks("macro2").Sheets("constantes").Cells(8, col).Value 'mu=8.206327E-2, déclaré comme variant
P = Workbooks("macro2").Sheets("hi-H0" & col).Range("K2").Value 'P=1.290999 au moment du bug, déclaré comme variant
rho_weibull = Workbooks("macro2").Sheets("hi-H0" & col).Range("G3").Value 'rho_weibull = 1,0932476 au moment du bug, déclaré comme variant
If mini = m1 Then
Sheets("houle_dirp").Cells(2, compt).Value = H0 + (1 / rho_weibull * Math.Log(12 * mu)) ^ (1 / P)
Sheets("houle_dirp").Cells(3, compt).Value = H0 + (1 / rho_weibull * Math.Log(120 * mu)) ^ (1 / P)
Sheets("houle_dirp").Cells(4, compt).Value = H0 + (1 / rho_weibull * Math.Log(1200 * mu)) ^ (1 / P)
Sheets("houle_dirp").Cells(6, compt).Value = mini
End If
compt = compt + 1
End If
Next col |
Partager