Want to divide a number into groups of thousands

O

Ooley

I have a number, say 3,450, that I want to subdivide into groups of 1,000
like this:

1000
1000
1000
450

I want this to repeat in as many cells as needed to get down to 0.

Any suggestions?
 
E

Elkar

Assuming your number is in cell A1, and your "groups" continue down Column A.
In A2 enter:

=MIN($A$1*2-SUM($A$1:A1),1000)

Copy down as far as needed.

HTH,
Elkar
 
B

Bernard Liengme

With the number in A1
In B1 enter: =MIN(A1,1000)
In B2 enter:
=IF(MIN(ABS($A$1-SUM($B$1:B1)),1000)=0,"",MIN(ABS($A$1-SUM($B$1:B1)),1000))
copy down the column

But a VBA solution might be better if this is serious work.
best wishes
 
R

Rodrigo Ferreira

Try this:
A1 = 3450
B1 = 1000
C2 = MIN(B$1;MAX($A$1-(B$1*(COUNTIF(C$1:C1;"<>")));0))
Copy C2 to other cells
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top