{"text_format":"1","workbook":"xlsx","n_sheets":4,"sheets":["Summary","Solver","Custom function","Macro"],"not_rendered":{"charts":0,"images":4,"macros":1,"external_links":1,"defined_names":91,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Summary","index":0,"n_rows":17,"n_cols":7,"rows_kept":17,"cut":false,"hidden":false,"merged":[[5,1,5,2],[3,1,3,2]]}
[]
[]
[]
[null,"Find All Combinations That Equal Given Sum"]
[]
[null,"The workbook shows how to find all combinations from a certain set of numbers that sum to a given total with Excel Solver, custom function and VBA macro. "]
[null,"Author","Ablebits.com"]
[null,"Last update","2023-07-21"]
[null,"Tutorial URL","Find all combinations of numbers that equal a given sum in Excel"]
[]
[null,"Examples:"]
["• ","Find a combination of numbers equal to a given sum - Excel Solver"]
["• ","Get all combinations that sum to a specific total - custom function"]
["• ","Return all combinations that add up to a given value - VBA macro"]
[]
[]
[null,null,null,null,null,null," "]

{"sheet":"Solver","index":1,"n_rows":13,"n_cols":4,"rows_kept":13,"cut":false,"hidden":false,"merged":[[0,0,0,1]]}
["Find combination that equals a given sum "]
["Numbers","Combination",null,"How to use the Solver add-in"]
[1,0,null,"1. Select cell B13."]
[2,1,null,"2. On the Data tab, in the Analysis group, click the Solver button."]
[3,1,null,"3. Review the Solver settings and click the Solve button."]
[4,0,null,"4. As a result, 1 is inserted next to the numbers that add up to the specified sum. "]
[5,1]
[6,1,null,"The detailed instructions are here: https://www.ablebits.com/office-addins-blog/find-combinations-that-equal-given-sum-excel/#solver"]
[7,1]
[8,1]
[9,1]
[10,1]
["Sum",{"$f":"SUMPRODUCT(A3:A12, B3:B12)","v":50}]

{"sheet":"Custom function","index":2,"n_rows":15,"n_cols":6,"rows_kept":15,"cut":false,"hidden":false,"merged":[[0,0,0,5],[4,2,4,5]]}
["Find all combinations that equal a given sum - custom function"]
["Sum"]
[49]
[]
["Numbers",null,"Result"]
[1,null,{"$f":"FindSumCombinations(A6:A15, A3)","v":"{1,2,3,4,5,7,8,9,10}"},"{1,3,5,6,7,8,9,10}","{2,3,4,6,7,8,9,10}","{4,5,6,7,8,9,10}"]
[2]
[3,null,"Result"]
[4,null,{"$f":"TRANSPOSE(FindSumCombinations(A6:A15, A3))","v":"{1,2,3,4,5,7,8,9,10}"}]
[5,null,"{1,3,5,6,7,8,9,10}"]
[6,null,"{2,3,4,6,7,8,9,10}"]
[7,null,"{4,5,6,7,8,9,10}"]
[8]
[9]
[10]

{"sheet":"Macro","index":3,"n_rows":13,"n_cols":11,"rows_kept":13,"cut":false,"hidden":false,"merged":[[2,5,2,7],[0,0,0,7]]}
["Find all combinations that equal a given sum - macro"]
[]
["Numbers",null,"Result","Sum",null,"Combinations",null,null,null,null,"How to use the macro"]
[1,null,"2,3,5,6,7,8,9,10",50,null,2,1,1,null,null,"1. Press Alt + F8 and run the FindAllCombinations macro."]
[2,null,"1,4,5,6,7,8,9,10",null,null,3,4,2,null,null,"2. On the form that pops up, define the following settings and click OK."]
[3,null,"1,2,3,4,6,7,8,9,10",null,null,5,5,3,null,null,"·         The range with the source numbers (A4:A13)"]
[4,null,null,null,null,6,6,4,null,null,"·         The target sum (50)"]
[5,null,null,null,null,7,7,6,null,null,"·         The upper-left cell of the destination range (C4)."]
[6,null,null,null,null,8,8,7]
[7,null,null,null,null,9,9,8,null,null,"The detailed instructions are here: https://www.ablebits.com/office-addins-blog/find-combinations-that-equal-given-sum-excel/#macro"]
[8,null,null,null,null,10,10,9]
[9,null,null,null,null,null,null,10]
[10,null,null,null,"Sum",{"$f":"SUM(F4:F12)","v":50},{"$f":"SUM(G4:G12)","v":50},50]