I have cell A1 which equals 12000.

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.

How do I do that?

Thanks for the help!
And