0

Sheet 1: I have a list of jobs in column A, for each job there is a charge of $10 in column B unless it was canceled in which case it will display 0. Sheet 2: I have a list of payments and a sum of those payments in cell C1 of Sheet 1. I want to allocate $10 to each row in Sheet 1 and deduct it from balance in column C until it is depleted and obviously include iferror to stop if blank cells.

Please help.

1 Answers1

0

I think you need something like this in C2 of Sheet1:

=ArrayFormula(if(A2:A="","",if(sumif(row(A2:A),"<="&row(A2:A),B2:B)<=Sheet2!C1,B2:B,"Depleted")))

Assuming you have $100 in Sheet2!C1, this would give:

enter image description here

Tom Sharpe
  • 30,727
  • 5
  • 24
  • 37