I am working on a sheet that has a total amount in cell A2.
I have a column of prices in F3:F.
What I need is a formula that will calculate a subtotal up to the value of A2 without going over.
So far I have:
G3 = F3
G4 = if((F3+F4)<$A$2, sum(F3,F4), "")
Now this works when I autofill down, but it does not continue to sum the non-blank cells.
How do I auto sum non-blank, non-adjacent cells to give a running total that excludes the sum of cells that are greater A2.
The goal is to get a sum of prices that is <= A2, without going over.
TIA
Ron
I have a column of prices in F3:F.
What I need is a formula that will calculate a subtotal up to the value of A2 without going over.
So far I have:
G3 = F3
G4 = if((F3+F4)<$A$2, sum(F3,F4), "")
Now this works when I autofill down, but it does not continue to sum the non-blank cells.
How do I auto sum non-blank, non-adjacent cells to give a running total that excludes the sum of cells that are greater A2.
The goal is to get a sum of prices that is <= A2, without going over.
TIA
Ron