+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    06-14-2009
    Location
    SG
    MS-Off Ver
    Excel 2003
    Posts
    6

    Unhappy how do you create a double condition in excel

    Hi,

    I am trying to set a constraint that for every kg of fish is eaten, 0.5kg of rice must be eaten.
    A=Fish
    B=Rice
    Could anyone tell me how to set this constraint in excel to check

    Thank you

  2. #2
    Forum Guru zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    5,701

    Re: how do you create a double condition in excel

    You can do this for example:

    =IF(A1/B1=2;"OK";IF(A1/B1<2;"Need more fish";"Need more rise"))

    or

    =LOOKUP(A1/B1;{0;2;2,001};{"Need more fish";"OK";"Need more rise"})

    (notice that both formula will return DIV/0 error if you don't enter number in B cell

    (replace ; with , and , with . if needed)
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Registered User
    Join Date
    06-14-2009
    Location
    SG
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: how do you create a double condition in excel

    actually i am trying to use solver to solve a equation
    I have fish price at $1.23
    rice price at $1.24
    And I set the criteria, that every 1kg of rice is eaten, 0.5 kg of fish must be eaten.
    I also set a criteria that u must eat a minimum of 2kg of rice and 1kg of fish.

    I am not sure how to use solver to set the constraint for below.
    Any help appreciated.

    Thank you.

  4. #4
    Forum Guru zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    5,701

    Re: how do you create a double condition in excel

    Book19.xls

    See this.....
    "Relax. What is mind? No matter. What is matter? Never mind!"

  5. #5
    Registered User
    Join Date
    06-14-2009
    Location
    SG
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: how do you create a double condition in excel

    Sorry maybe I not specified enough in my question

    Actually this is my scenario
    I have fish price at $1.23
    rice price at $1.24
    Fish has 1 unit of fat and 2 unit of carbohydrate
    Rice has 2 unit of fat and 3 unit of carbohydrate
    3 criteria being set as below:
    Every 1kg of rice is eaten, 0.5 kg of fish must be eaten.
    U must eat a minimum of 2kg of rice and 1kg of fish.
    U must also get a minimum of 3 unit of fat and 4 unit of carbohydrate.

    I am not sure how to use solver to set the constraint for below.
    Any help appreciated.

    Thank you.
    Reply With Quote

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.2.0