التعامل مع المصفوفات.xlsm

Click here to download:
التعامل مع المصفوفات.xlsm (14 KB)

Sub arrset()

Dim N As Long

Dim Arr(1 To 15) As String

Debug.Print "LBound: " & CStr(LBound(Arr)), _

    "UBound: " & CStr(UBound(Arr)), _

    "NumElements: " & CStr(UBound(Arr) - LBound(Arr) + 1)

For N = LBound(Arr) To UBound(Arr)

    Arr(N) = N

    With Sheets(1)

        If Arr(N) > 12 Then Arr(14) = vbNullString

        .Cells(N, 2) = Arr(N)

End With

Next N

End Sub

Posted by Abdo Kera