Hi, Andman. I'm not sure if JulieD is around, so I'll jump in. Without VBA,
you can't have a formula change the contents of another cell. You can,
however, use a helper row to accomplish your task. In C2, place this
formula:
=IF(C1>A1,A1,C1)
then in D2 place:
=IF(C2<>C1,0,IF(SUM($C$1:D1)<=$A$1,D1,$A$1-SUM($C$1:C1)))
copy this formula through P2
HTH
Bruce
"Andman" wrote:
> I have a twist on a problem that was answered earlier by the very intelligent
> JulieD.
>
> I want to add columns A2 through P2 until it equals the total in cell A1
> Once the total would be met it would zero out the remainder of the cells.
>
> For Example:
>
> Cell A1 = 30
> Cell A2 = 14
> Cell B2 = 15
> Cell C2 = 16
> Cell D2 = 17 etc. (All the way to P2 which equals 29)
>
> In the end I need:
> Cell A3 to equal 14
> Cell B3 to equal 15, But we still need to add as we have not reached
> 30.
> Cell C3 to equal 1, Because we only need 1 more to total to 30
> Cells D3 to P3 to equal 0 as we have equaled or matched Cell A1 which is 30
>
> I hope you can help again!
>
> Andman
>
>
Bookmarks