Friday, April 6, 2012

Build-up your Logic in VBA(Create Pyramid)


Sub test()
k = 1
c = 9
For i = 10 To 1 Step -1
For j = c To k Step -1

    Cells(i, j) = "*"
     
Next j
k = k + 1
c = c - 1
Next i

End Sub

2 comments: