+ Reply to Thread
Results 1 to 3 of 3

Division by zero - Solver

  1. #1
    Registered User
    Join Date
    05-09-2016
    Location
    London
    MS-Off Ver
    Office 2016
    Posts
    1

    Division by zero - Solver

    Hello,


    I'm working on a simple linear programming problem where I have to minimise costs.
    One of the constraints is that in a food mix, the ratio of ingredient A to ingredient B cannot exceed 3 to 1.

    What I did is create a new cell and typed in: =(3*(E20))/D20 where E20 and D20 are cells with amounts of ingredient A and B respectively.
    The problem is that I get the #DIV/0! (division by zero) error, since solver will also try some solutions where D20 is zero.

    How to re-write this

    Thanks

  2. #2
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Perth Western Australia
    MS-Off Ver
    Office 365
    Posts
    257

    Re: Division by zero - Solver

    Hi

    Try iferror((3*(E20))/D2,0)

    Cheers

  3. #3
    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: Division by zero - Solver

    Or perhaps add a constraint for D20 i.e.
    Please Login or Register  to view this content.
    Alf

+ 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. Replies: 1
    Last Post: 04-27-2016, 03:05 PM
  2. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  3. macro not keeping solver solutions when solver is successful
    By jimmypants in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2014, 01:45 AM
  4. Replies: 6
    Last Post: 05-18-2013, 05:49 AM
  5. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  6. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 AM
  7. division gives wrong answer (division)
    By Brice in forum Excel General
    Replies: 5
    Last Post: 12-24-2010, 10:13 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