
k = 0 'valori misurati quote strane
For j = 0 To Cells(Columns.Count).End(xlToLeft).Column Step dist
y = m + 5
For i = offset To Cells(Rows.Count, 1).End(xlUp).Row
With Sheets("eCAV")
If (IsNumeric(Trim(Cells(i, 2))) And IsNumeric(Trim(Cells(i - 1, 2)))) Or (IsNumeric(Trim(Cells(i, 2))) And Trim(Cells(i - 1, 2).Value = "")) And IsNumeric(Trim(Cells(i, 3))) Then
.Cells(25 + k, y) = Cells(i, 2 + j)
.Cells(6, y) = Cells(i, 1 + y)
.Cells(7, y) = Cells(i, 3 + y) 'nominali
.Cells(8, y) = Cells(i, 3 + y) + Cells(i, 5) 'valori max toll
.Cells(9, y) = Cells(i, 3 + y) + Cells(i, 6) 'valori min toll
y = y + 1
End If
'nominali quote strane
If IsNumeric(Cells(i, 4)) And Cells(i, 1) = "PROFILE" Then
.Cells(6, y) = ""
For h = 2 To dist 'nomi quote
.Cells(6, y) = .Cells(6, y) & " " & Cells(i - 1, h)
Next h
.Cells(25 + k, y) = Cells(i, 4 + j)
.Cells(7, y) = Cells(i, 5 + y) 'nominali
.Cells(8, y) = Cells(i, 5 + y) + Cells(i, 7) 'valori max toll
.Cells(9, y) = Cells(i, 5 + y) + Cells(i, 8) 'valori min toll
y = y + 1
End If
End With
Next i
k = k + 1
Next j |
For i = offset To Cells(Rows.Count, 1).End(xlUp).Row
With Sheets("eCAV")
If (IsNumeric(Trim(Cells(i, 2))) And IsNumeric(Trim(Cells(i - 1, 2)))) Or (IsNumeric(Trim(Cells(i, 2))) And Trim(Cells(i - 1, 2).Value = "")) And IsNumeric(Trim(Cells(i, 3))) Then
.Cells(25 + k, y) = Cells(i, 2 + j)
.Cells(6, y) = Cells(i, 1 + y)
.Cells(7, y) = Cells(i, 3 + y) 'nominali
.Cells(8, y) = Cells(i, 3 + y) + Cells(i, 5) 'valori max toll
.Cells(9, y) = Cells(i, 3 + y) + Cells(i, 6) 'valori min toll
y = y + 1
End If |
