Counting down numbers

wyatt1234

New Member
Joined
Nov 23, 2006
Messages
23
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
Joined
Jun 20, 2002
Messages
8,105
Office Version
  1. 365
B1 = 1 [or, =IF(A1="","",1)]
B2 =IF(ROW()<=A$1,B1+1,"") copied down though B50
 

facethegod

Well-known Member
Joined
Aug 1, 2006
Messages
767
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
Joined
Jun 20, 2002
Messages
8,105
Office Version
  1. 365
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
Joined
Nov 23, 2006
Messages
23
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
 

Forum statistics

Threads
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?

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