vba not respond at all, no errors

montecarlo2012

Well-known Member
Joined
Jan 26, 2011
Messages
986
Office Version
  1. 2010
Platform
  1. Windows
Hello everyone
Working on this code
VBA Code:
Sub ppp()
N = 13
      For i = N To -N
      
               For j = N To Abs(i) Step -j
               
               Cells(i, j) = "X"
               
               Next j
      Next i

End Sub
Do not show me nothing plus do not show errors either.
I am trying to get:
1618794373716.png

Please
Your input matters to me
Thanks for reading this.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try this
VBA Code:
Sub ppp()
n = 13
s = 1
For j = 1 To 8 Step 1
      For i = n To s Step -1
               Cells(i, j) = "X"
               
               Next i
               n = n - 1
               s = s + 1
      Next j

End Sub
 
Upvote 0
Solution
VBA Code:
Sub DemoC()
        N% = 7
    For C% = 1 To N
    For R% = C To N * 2 - C
        Cells(R, C).Value2 = "X"
    Next R, C
End Sub
 
Upvote 0
VBA Code:
Sub DemoR()
        N% = 7
    For R% = 1 To (N * 2) - 1
    For C% = 1 To R + 2 * (R Mod 7) * (R > N)
        Cells(R, C).Value2 = "X"
    Next C, R
End Sub
 
Upvote 0
your welcome. Glad I could Help. Thanks for the feedback,
 
Upvote 0
VBA Code:
Sub DemoW()
          N% = 13
    While N > 0
        C% = C% + 1
        For R% = C To C + N - 1:  Cells(R, C).Value2 = "X":  Next
        N = N - 2
    Wend
End Sub
 
Upvote 0
Last but not least :​
VBA Code:
Sub DemoC2()
        N% = 13
    For C% = 1 To N \ 2 + 1
    For R% = C To N - C + 1
        Cells(R, C).Value2 = "X"
    Next R, C
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,752
Messages
6,180,743
Members
452,996
Latest member
nelsonsix66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top