+ Reply to Thread
Results 1 to 4 of 4

If function with 2 conditions

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    If function with 2 conditions

    Hi all,

    Please help to fix my formula below. I just want to be able to get the total fee when 2 conditions are met.

    =IF(I7<=3,(E7*5),IF(I7<=12,(E7*14),IF(I7<=18,(E7*30),IF(I7<=36,(E7*40),IF(I7<=250,(E7*50),IF(I7>370,(E7*100)))))))*2

    This formula works but I like to add another condition IF C and D column is not equal to ''APPLE" then multiple into 2 else multiple to 1.

    thank you in advance.

  2. #2
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: If function with 2 conditions

    Try this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007, Excel 2003, Excel 2016, Excel 365
    Posts
    93

    Re: If function with 2 conditions

    Thanks Shareez,

    You're formula works but only if the I column is static. for better understanding, please see below table:

    Age Max No. of Days Unit Price
    1-3 days 3 5
    4d - 1w 12 14
    >1w - 2w 18 30
    >2w - 1m 36 40
    >1m-8m 250 50
    >8m 370 100


    Sample worksheet
    PROD 1 PROD 2 QTY AGE AMOUNT RESULT
    Apple Orange 5 3 should be if column A or Column B is equal to "Apple", then QTY * Unit Price accordg to Max no. of Days ELSE multiple amount by 2 25
    Grapes Apple 10 8 should be if column A or Column B is equal to "Apple", then QTY * Unit Price accordg to Max no. of Days ELSE multiple amount by 2 140
    Grapes Orange 15 35 should be if column A or Column B is equal to "Apple", then QTY * Unit Price accordg to Max no. of Days ELSE multiple amount by 2 1200
    Kiwi Grapes 20 249 should be if column A or Column B is equal to "Apple", then QTY * Unit Price accordg to Max no. of Days ELSE multiple amount by 2 2000

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: If function with 2 conditions

    Will you please attach a small sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment (it hasn't worked for years, and despite our repeatedly asking the technical team who own the forum to fix it, they can't be bothered to do so), so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] if multiple conditions are met, perform sum function using index function
    By billrogers184 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2018, 02:49 PM
  2. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  3. [SOLVED] Function needs more than 2 Conditions
    By Floydlevedale in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 12:13 PM
  4. [SOLVED] Satisfying 2 conditions using if function or other function
    By aparunkumar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-22-2013, 12:19 PM
  5. If function with 2 conditions.
    By Jakkov in forum Excel General
    Replies: 4
    Last Post: 07-29-2010, 03:04 PM
  6. [SOLVED] Two Conditions Function
    By Freshman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] Two Conditions Function
    By Freshman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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