So, anyone that knows how NOL's work in taxes will understand what I'm going through. I have a list of amounts starting in column O through column AH. In some rows the first three columns (O, P & Q) may be blank, then the next column (R) and the columns after it may have values. What I want to do is if there is an amount in column N, let's say $100, I want it to subtract that $100 from the first cell on the same row that has an value other than 0 in it. If that value is $75, then I want it to continue going to the right until it finds the next cell with a value, and remove the remaining $25 from it.
Looking at the attachment, if there is an amount in column A, I want it to subtract that amount from the first value that appears in the corresponding row. For example, row 36 has an amount of 1,926,369. The first value on that row is 257,193. I want it to zero out that first amount because it doesn't completely cover the original amount, and whatever is left (1,926,369-257,193=1,669,176) I want to be applied to the next value, which would be cell k36 (1,669,176).
The only way I can think of doing this is using a large IF formula, but I'm thinking there must be an easier way.
Thanks for looking!
Bookmarks