Y yanaloo2002@ New Member Sep 14, 2011 #1 How to set Excel formula to sum up a range of cells but to stop when it reaches to an amount equal to another particular cell.
How to set Excel formula to sum up a range of cells but to stop when it reaches to an amount equal to another particular cell.
Hui Excel Ninja Staff member Sep 14, 2011 #2 If you are summing up a column until you get to a value a simple If can do that job Col A: your data C1 is your max value B2: =IF(MAX($B$1:B1)+A2>$C$1,"",B1+A2) copy down If you want to select cells in a range that sum to a value, have a read of this where it was comprehensively covered http://www.dailydoseofexcel.com/archives/2005/10/27/which-numbers-sum-to-target/
If you are summing up a column until you get to a value a simple If can do that job Col A: your data C1 is your max value B2: =IF(MAX($B$1:B1)+A2>$C$1,"",B1+A2) copy down If you want to select cells in a range that sum to a value, have a read of this where it was comprehensively covered http://www.dailydoseofexcel.com/archives/2005/10/27/which-numbers-sum-to-target/