variabili con indice e uso matrice
vedi
matema7.xls

scrivere 4 interi nelle celle A4,A5,B4,B5
cliccare su pulsante 1 per attivare, pulsante 2 per cancellare

Private Sub CommandButton1_Click()
Rem matema7 uso di matrice e variabili con indice
Dim matrice(2, 2) As Integer
Dim r, c As Integer
matrice(1, 1) = Cells(4, 1)
matrice(1, 2) = Cells(4, 2)
matrice(2, 1) = Cells(5, 1)
matrice(2, 2) = Cells(5, 2)
For r = 1 To 2
For c = 1 To 2
Cells(r, c) = matrice(r, c)
Next c
Next r
End Sub

Private Sub CommandButton2_Click()
Rem cancella
For r = 1 To 5
For c = 1 To 5
Cells(r, c) = ""
Next c
Next r
End Sub