List 1 to n in cells for a given n

ajaysomasi

New Member
Joined
Mar 6, 2017
Messages
25
Hi, I have a number in cell A1 which keeps changing.. Whatever that number is, I want excel to list 1 to n automatically as the number keeps changing..

Example, if I have 10 in cell A1, it should list 1 to 10 from C1 to C10.. if I change it to 20, it should list 1 to 20.. change it back to 15, it should list 1 to 15..

can u please help me with a formula or vba code please...
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
hi mikerickson, thank you for this..

I have a second question.. now that list keeps changing based on the value in A1, how do I plot these values automatically.. I mean how to capture the changing list (sometimes 1 to 20, sometime 1 to 15 etc) in an automatic manner in a chart ignoring all the other "" cells..
 
Upvote 0

Forum statistics

Threads
1,223,704
Messages
6,173,984
Members
452,540
Latest member
haasro02

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