+ Reply to Thread
Results 1 to 4 of 4

SOLVER Syntax Help

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2003
    Posts
    3

    SOLVER Syntax Help

    I'm working with the SOLVER addin in excel. I'm trying to enter a loop and an if statement in the follwoing VBA syntax:

    SolverOk SetCell:="$T$24", MaxMinVal:=2, ValueOf:="0", ByChange:=" I would like to enter here a loop and an if statement so that I can select the cells I'm interested in "
    SolverAdd CellRef:="$B$25", Relation:=2, FormulaText:="0"
    SolverSolve userFinish:=True
    Any help would be appreciated!

    Thanks,
    Augusto
    Last edited by afrausin; 02-15-2011 at 01:31 PM. Reason: Moderator request

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: SOLVER Syntax Help

    Welcome to the forum.

    I think you need to provide a little more information about what you're trying to do.

    Also, please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-15-2011
    Location
    Atlanta
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SOLVER Syntax Help

    Thanks for the welcome and sorry if I was not clear in my question!

    I am trying to dynamically select the cells in the ByChange function. I think the way to do it is to (1) define the range:

    Please Login or Register  to view this content.
    and (2) insert that range in the ByChange function:

    Please Login or Register  to view this content.

    if this is the right syntax, how do I set Rng to all cells within the matrix A1:D5 that are > 0?

    Thank you!
    Augusto

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: SOLVER Syntax Help

    Maybe like this:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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