Counting down numbers

wyatt1234

New Member
I have an excell spreadsheet that requires me to put in sample numbers. I would like this spreadsheet to count off the number listed and list the numbers down a column.

for example.

If I put a 1 in cell A1 it will put a 1 in cell B1

If I put a 2 in cell A1 it will put a 1 in cell B1 and a 2 in cell B2

If I put a 3 in cell A1 it will put a 1 in cell B1, a 2 in cell B2 and a 3 in cell B3

and so on. The sample numbers are random and run from 1-50

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Oaktree

MrExcel MVP
B1 = 1 [or, =IF(A1="","",1)]
B2 =IF(ROW()<=A\$1,B1+1,"") copied down though B50

wyatt1234

New Member
For some reason these formulas do not work

facethegod

Well-known Member
Try this in B1, and copy as far as needed

=IF(ROW()<\$A\$1,\$A\$1-(\$A\$1-ROW()),IF(ROW()>\$A\$1,"",\$A\$1))

HTH

Oaktree

MrExcel MVP
For some reason these formulas do not work

What do you mean? If A1 = 5, B1 will = 1, B2 will = 2, ..., B5 will = 5.

Maybe calculation is set to manual?

wyatt1234

New Member
B1 = 1 [or, =IF(A1="","",1)]
B2 =IF(ROW()<=A\$1,B1+1,"") copied down though B50

The B2 formuala works at least once however, my computer has issues with the B1 formula it doesn't like the or statment.

=IF(ROW()<\$A\$1,\$A\$1-(\$A\$1-ROW()),IF(ROW()>\$A\$1,"",\$A\$1))

This formual works once but for the next set of samples it shows all zeros. That's what makes this problem difficult there are many different sample numbers.

sample #
ie 3 1
2
3
2 1
2

Replies
7
Views
328
Replies
1
Views
413
Replies
2
Views
1K
Replies
4
Views
689
Replies
5
Views
623

1,181,055
Messages
5,927,863
Members
436,573
Latest member
CMR237

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?

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

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