Auto-size list question

Evripos

New Member
Joined
Mar 3, 2011
Messages
16
Hi.
I have a columnar list which I would like to make it dynamic based on a number I input. So, if I have let's say the following columnar list how can I make it become shorter or longer based solely on my numerical input?
Input n=10
[TABLE="width: 64"]
<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>[TR]
[TD="width: 64"]Car1[/TD]
[/TR]
[TR]
[TD]Car2[/TD]
[/TR]
[TR]
[TD]Car3[/TD]
[/TR]
[TR]
[TD]Car4[/TD]
[/TR]
[TR]
[TD]Car5[/TD]
[/TR]
[TR]
[TD]Car6[/TD]
[/TR]
[TR]
[TD]Car7[/TD]
[/TR]
[TR]
[TD]Car8[/TD]
[/TR]
[TR]
[TD]Car9
[/TD]
[/TR]
[TR]
[TD]Car10


[/TD]
[/TR]
</tbody>[/TABLE]
Thank you.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The simplest way that I can imagine is by using a Table. In the table you create, your numerical entry would be in one column (I used Column A:A), and another column would have the formula: ="Car" & A2 (or whatever). Since it's a Table, the formula at B2 would be repeated row-by-row as entries are made below A2.
 
Upvote 0
Hi

Write in column A the list with the maximum number of elements that you need.
Write in B1 how many you want

Define the name:

Name: CarList
RefersTo: =OFFSET(A1,0,0,B1)

CarList will be your dynamic list.
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,227
Members
453,025
Latest member
Hannah_Pham93

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