uso di For Each c in Selection

Rem uso di For Each c in Selection

vedi formato10.xls

Private Sub CommandButton1_Click()
Rem formato10
Rem uso di For Each c in Selection
Dim c As Variant
Dim k As Integer
Dim h As Integer
k = 10
riga = 0
For Each c In Selection
dato = c.Value
If dato > 0 Then
riga = riga + 1
Cells(riga, 3) = c.Value * k
Cells(riga, 4) = c.Value * 100
End If
Next c
End Sub

Private Sub CommandButton2_Click()
Rem cancellare
For a = 1 To 10
For b = 1 To 4
Cells(a, b) = ""
Next b
Next a
End Sub

indice