Hello: I'll try to explain as best I can.
I have a spreadsheet with a column that have numeric values. What I need to do is loop through these values to a sum no greater than 5000 (doesn't matter in which order); the tricky part that I have no idea where to start is to enter a date in the adjacent cell of all affected cells that comprised this sum. This date would be working backwards from a predetermined date; something like =MIN(range)-1. So a column with values would have the following dates associated as the sum is as close to 5000 but no more than 5000 191 15-Sep 235 15-Sep 328 15-Sep 534 15-Sep 112 15-Sep 155 15-Sep 173 15-Sep 203 15-Sep 238 15-Sep 1 15-Sep 14 15-Sep 57 15-Sep 347 15-Sep 48 15-Sep 257 15-Sep 301 15-Sep 307 15-Sep 513 15-Sep 386 15-Sep 401 15-Sep 57 15-Sep 150 14-Sep 52 15-Sep 187 14-Sep 77 14-Sep 82 15-Sep 2 14-Sep 156 14-Sep 270 14-Sep 474 14-Sep 3 14-Sep 156 14-Sep 277 14-Sep 280 14-Sep 215 14-Sep 445 14-Sep 885 14-Sep 457 14-Sep 414 14-Sep 277 14-Sep ...any ideas? TIA --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---