View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andi Andi is offline
external usenet poster
 
Posts: 25
Default decrease integers to zero

I've looked around for this issue and can't seem to find one - my apologies
for any duplications.

At the top of Column B, I have a total amount. I have a formula based
calculation in Column B. Based on these numbers, I have a 'running total' at
the bottom of Column B. (B1-sum(B2:B17)). Some of the cells formuals come
to zero at the bottom cells of the column. I would like to add 1 to each
cell, starting with those that have a zero and then back to the top with the
higher numbers until the 'running total' is zero.

Here's what it looks like:
Total Available 62
A 16
B 12
C 9
D 7
E 5
F 0
G 0
H 0
I 0
J 0
K 0
L 0
M 0
N 0
O 0
P 0
Running Total 13
Here's what I want the end result to be, without having to manually enter
the information:

Total Available 62
A 17
B 13
C 9
D 7
E 5
F 1
G 1
H 1
I 1
J 1
K 1
L 1
M 1
N 1
O 1
P 1
Running Total 0


Any ideas? I keep running into circular reference issues that I'm just not
good at.
Any help is appreciated! This is part of a bigger revamp of a spreadsheet.