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

This formula works very well, thanks again.

Does anyone have ideas on how to work the formula in column B? The formula
currently there is =INT($B$20*A2).
Obviously, there are numbers in column A and cell B20.

Thanks!!!

"Harlan Grove" wrote:

Andi wrote...
....
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.

....

It may be possible to do this with a single array formula in B2:B17,
but you'd need to show the formulas currently in B2:B17.

It could be done in C2:C17 using the formulas

C2:
=B2+INT(B$19/ROWS(B$2:B$17))+(MOD(B$19,ROWS(B$2:B$17))
MOD(COUNTIF(B$2:B$17,"0")-ROWS(B2:B$17),ROWS(B$2:B$17)))


Fill C2 down into C3:C17.