+ Reply to Thread
Results 1 to 5 of 5

Dynamic Filtering with Solver

  1. #1
    Registered User
    Join Date
    10-21-2020
    Location
    AU
    MS-Off Ver
    16
    Posts
    8

    Dynamic Filtering with Solver

    Hi All,

    I'm new here but have been using excelforum for a while, you guys have been a great help.


    I want to use Excel Solver to solve MAX(Sum()) by iterating a variable cell from 1 to 4. Thing is, this cell is used to filter the primary table.

    E.g. If variablecell's value is changed to 4, the table will filter for values of 4, which in turn adjusts the MAX cell

    Please find attached an example

    Anyway you can think of getting the solver to work in this fashion (ideally without VBA)?

    Cheers,
    John
    Attached Files Attached Files
    Last edited by kangajohn; 10-21-2020 at 06:50 AM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Dynamic Filtering with Solver

    Perhaps like this? As solver is not happy with your changing K2 I've set up your model running Evolutionary solver and using M5 as the cell to change. Still it's
    not the best solution as solver finds a solution almost at once but will not stop so I set a time limit of 5 seconds to get a result.

    Looking at the text lower left corner of screen you see Incumbent 15000 pop up almost immediately i.e. the solution but solver keeps on testing because it's not sure this is the best
    solution. When message box pops up click "Stop"

    Alf
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-21-2020
    Location
    AU
    MS-Off Ver
    16
    Posts
    8

    Re: Dynamic Filtering with Solver

    Thanks Alf. that did the trick!
    I guess it isn't ideal but exactly what i was looking for appreciate your help saved me lots of hours

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Dynamic Filtering with Solver

    You are welcome and thanks for feedback

    Alf

  5. #5
    Registered User
    Join Date
    09-14-2018
    Location
    China
    MS-Off Ver
    Office 2010
    Posts
    41

    Re: Dynamic Filtering with Solver

    Use Array Formula
    Type 1 in N5, 2 in N6...
    Type formula
    =SUM(IF(ISNUMBER(SEARCH(N5,"" & $D$4:$D$23)),$D$4:$D$23))
    in O5, copy the formula down....

+ 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] DAX/Measures MAX with Dynamic Filtering
    By lanmel in forum Excel General
    Replies: 6
    Last Post: 07-25-2019, 10:52 AM
  2. Dynamic Filtering to New Sheets
    By etudes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-23-2018, 10:51 PM
  3. [SOLVED] Create a dynamic range for by changing variable cells box in solver
    By Ad896832 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2017, 02:03 PM
  4. Dynamic date filtering
    By jarkko_2 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 11-15-2016, 01:33 PM
  5. Dynamic Filtering of records
    By Jovillanueva in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2013, 01:25 AM
  6. How to use Solver & Dynamic Programming to solve this problem?
    By brooklyn12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2013, 03:45 PM
  7. [SOLVED] Solver and dynamic ranges
    By tim in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-04-2005, 09:06 PM

Tags for this Thread

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