Auto-size list question

Evripos

New Member
Joined
Mar 3, 2011
Messages
14
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
Car1
Car2
Car3
Car4
Car5
Car6
Car7
Car8
Car9
Car10



<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>
Thank you.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

BlueHornet

Active Member
Joined
Apr 13, 2012
Messages
340
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.
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,887
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,598
Messages
5,832,645
Members
430,150
Latest member
amitk1

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
Top