Sub VOL()
Dim Cella, valore As Long
Uriga = Range("A" & Rows.Count).End(xlUp).Row
For X = 2 To Uriga
Cella = Cells(X, 1)
If Cella = "" Then Exit For
If Cella = "faggio" Then
Cells(X, 7) = (0.81151 + 0.038965 * (Cells(X, 3) ^ 2) * Cells(X, 6)) / 1000
ElseIf Cella = "ontano nero" Then
Cells(X, 7) = (-2.2932 * 10 + (3.2641 * 10 ^ -2 * Cells(X, 3) ^ 2 * Cells(X, 6)) + (2.9991 * Cells(X, 3))) / 1000
ElseIf Cella = "ontano bianco" Then
Cells(X, 7) = (-2.2932 * 10 + (3.2641 * 10 ^ -2 * Cells(X, 3) ^ 2 * Cells(X, 6)) + (2.9991 * Cells(X, 3))) / 1000
ElseIf Cella = "acero montano" Then
Cells(X, 7) = (1.6905 + 3.7082 * 0.01 * Cells(X, 3) ^ 2 * Cells(X, 6)) / 1000
End If
Next
End Sub
|