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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

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