1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Option Explicit
Option Base 1
Sub tableauv1()
Dim i As Integer, j As Integer, tableau(20, 4) As String
j = 1
For i = 1 To 20
If Not IsEmpty(Range("A1").Cells(i, 1)) Then
tableau(j, 1) = Range("A1").Cells(i, 1)
tableau(j, 2) = Range("A1").Cells(i, 2)
tableau(j, 3) = Range("A1").Cells(i, 3)
tableau(j, 4) = Range("A1").Cells(i, 4)
j = j + 1
End If
Next
Application.Workbooks.Open ("\\MCA-SERVEUR\OPCVM\XAVIER\Tests\xaxa.xls")
Range(Cells(1, 1), Cells(j - 1, 4)) = tableau()
End Sub |
Partager