Outputting numbers 1 to 100 in rows of 10 [Closed]

Report
-
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
-
Hello,

Could someone give me help with Excel: how to output the numbers 1 to 100 (10 rows with 10 columns) using a For loop. so far i have the following

For x = 1 To 10
Cells(1, x) = x
Next x

For x = 1 To 10
Cells(2, x) = x + 10
Next x

etc....

This works but I would like to make the code as short as possible. As you can guess I'm a beginner to using Excel so any help would be much appreciated.

1 reply

Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
'Hello
'Try this
for i=1 to 100
for j=1 to 100
cells(i,j)=i*j
next j
next i



6
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 4223 users have said thank you to us this month