+ Reply to Thread
Results 1 to 3 of 3

randomly choose cells for a specific input goal budget

  1. #1
    Registered User
    Join Date
    06-20-2015
    Location
    Hemet, CA
    MS-Off Ver
    2010
    Posts
    2

    randomly choose cells for a specific input goal budget

    I'm not sure if Excel can do this, but is there a function for this scenario? Lets say I have 100 line items containing bills that total $50,000, but my budget is $20,000. None of the bills have priority over the others, so it makes no difference to me which ones I delay payment on. I just need a way to randomly choose line items that will get me as close as possible to without going over my $20,000 goal. Is there a way to do that without manually trying different combinations?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: randomly choose cells for a specific input goal budget

    The Solver add-in should be able to handle a task like that. Usual approach:

    1) Add a column/row of 1's and 0's in an adjacent row/column
    2) Add a =SUMPRODUCT() function using the bills and this column of 1/0 (https://support.office.com/en-us/art...c-4d2145a2fd2e )
    3) Call Solver and tell it to:
    a) set target cell -- the cell with the sumproduct() function
    b) to a maximum
    c) by changing -- the row/column of 1/0
    d) subject to the constraint that the target cell is <=50000
    e) and subject to the constraint that the by changing cells are binary
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    06-20-2015
    Location
    Hemet, CA
    MS-Off Ver
    2010
    Posts
    2

    Re: randomly choose cells for a specific input goal budget

    Awesome. Thank you MrShorty.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Move goal times to specific cells
    By Consty1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2013, 05:08 AM
  2. Budget / Goal planning worksheet
    By schwalby in forum Excel General
    Replies: 3
    Last Post: 09-09-2011, 09:03 AM
  3. Define set of files and choose one randomly.
    By Bob@Sun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-28-2010, 10:57 AM
  4. How to randomly choose sample rows after using Autofilter??
    By Saarang84 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-08-2009, 03:43 AM
  5. Randomly Choose Cells from Colum/Row
    By J in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-18-2005, 10:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1