montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 986
- Office Version
- 2010
- Platform
- Windows
Hi all
working on
No return or error messages..
Output expected
Please
Your input will be appreciated.
Thank you for reading this.
working on
VBA Code:
Sub ff()
Dim i%, j%, k%, l%
Dim lines%, space%
lines = 15
space = 0
For i = 1 To lines ' this loop is used to print lines
For j = 1 To space ' this loop is used to print space in a line
Cells(i, j).Value2 = " "
For k = 1 To lines ' this loop is used to print numbers in a line
If j <= (lines - i) Then
Cells(i, j).Value2 = j
Else
Cells(i, j).Value2 = "*"
While j > 0 'this loop is used to print numbers in a line
If j > (lines - i) Then
Cells(i, j).Value2 = " * "
Else
Cells(i, j).Value2 = j
If ((lines - i) > 9) Then 'this loop is used to increment space
space = space + 1
Cells(i, j).Value2 = ""
Next k
Next j
Next i
End Sub
Output expected
Please
Your input will be appreciated.
Thank you for reading this.