# Multiplication table problem

#### Flewloon

##### New Member
I am trying to make a multiplication table that automatically changes to the correct dimensions. For instance if I put 5 in one cell, I want excel to make a 5x5 multiplication table. Then if I put 10 into the cell I had 5 in, excel would make a 10x10 table. Is there any way to do this? Thanks in advance

### Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

##### Well-known Member
In Cell B1 type in the following formula:
=IF(\$A1>=COLUMN()-1,COLUMN()-1,"")
then drag this formula all the way across the columns in row 1 (as far as you want)

In Cell A2 type in the following formula:
=IF(A\$1>=ROW()-1,ROW()-1,"")
then drag this formula all the way down the rows in Column A (as far as you want)

In Cell B2 type in the following formula:
=IF(ISERROR(B\$1*\$A2)=TRUE,"",B\$1*\$A2)
here you'll drag this formula across and down the internals of the grid. how much will depend on what you did in the above two steps.

Cell A1 is going to be the place where you type in a number to determine the grid size.

You can also play with the column and row widths to get that 'grid effect'. Try also playing around with text alignment formatting and adding some background coloring.

Considering putting on some Sheet Protection (leave Cell A1 as unprotected) as to not accidentally mess up the formulas when changing the grid size.

Have fun!

#### Scott Huish

##### MrExcel MVP
Assuming the size of your table in M1:

In A1:
=IF(OR(ROWS(\$A\$1:A1)>\$M\$1,COLUMNS(\$A\$1:A1)>\$M\$1),"",ROWS(\$A\$1:A1)*COLUMNS(\$A\$1:A1))

Copy across and down.

Replies
2
Views
324
Replies
4
Views
278
Replies
1
Views
416
Replies
0
Views
221
Replies
0
Views
361

1,196,008
Messages
6,012,835
Members
441,732
Latest member
Ayon

### 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.

### Which adblocker are you using?

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

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