(Solved) – How to define range for next loop in VBA

(solved)-–-how-to-define-range-for-next-loop-in-vba

I’m a newbie and I’m trying to learn VBA (Sorry for any mistake in English, I’m not a native speaker).
I am trying to solve the following assignment:
“Create a procedure that outputs the multiplication table values ​​from 11 to 20 in Excel as shown below:”

multiplication table

This is my code:

Sub einmaleins()
Dim x As Integer, y As Integer
For x = 11 To 20
For y = 11 To 20
Cells(x, y) = x * y
Next
Next
End Sub

It works but puts the table from K11 to S20. I need it to enter the values from A1 to J10
I have tried

*Range("A1:J10").FormulaR1C1 = "=ROW(RC)*COLUMN(RC)"* 

but it doesn´t work.

Help is greatly appreciated

Leave a Reply

Your email address will not be published. Required fields are marked *