Answer the question
In order to leave comments, you need to log in
Excel VBA code. How to write diagonally in a table?
I'm new to VBA, and right now I don't know how to make Cells fill with numbers from 1 to 10 diagonally,
as in the image; if possible, with code.
Answer the question
In order to leave comments, you need to log in
Sub FillRange()
Dim i As Integer
For i = 1 To 10
Cells(i, i).Value = i
Next i
End Sub
Worksheets("Лист1").Cells(i, i).Value = i
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question