+ Reply to Thread
Results 1 to 7 of 7

Using multiple IF and AND

  1. #1
    Registered User
    Join Date
    01-31-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    8

    Using multiple IF and AND

    Hi, I have a multi level issue I need to create an IF function for.

    Firstly, I have 5 categories. L1, L2, L3, L4 and L5. These relate to types of Motorcycles (not important.!)

    I also have a value VMAX which is the top speed of the motorcycle.

    I need to return the "Test Speed" based on 2 IF variables.

    Test speed:
    (i) Vehicle categories L1 and L2: 40 km/h or 0.9 Vmax, whichever is lower;
    (ii) Vehicle categories L3, L5 and L4: 60 km/h or 0.9 Vmax, whichever is lower;

    I'm struggling. Thanks in advance
    Last edited by protechds; 01-02-2017 at 02:38 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Using multiple IF and AND

    Untested, but something like...
    =if(or(A1="L1",A1="L2"),min(40,A2*.9),min(60,A2*.9))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-31-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    8

    Re: Using multiple IF and AND

    Thanks, that works a treat but then how do I add the alternative speed for L3,L4 or L5 into the same expression?
    Dave

  4. #4
    Registered User
    Join Date
    01-31-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    8

    Re: Using multiple IF and AND

    For clarification, it is 40 or 0.9 * 40 for L1 and L2, OR 60 or 0.9 * 60 for L3, L4, L5 all need to be in the same expression.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Using multiple IF and AND

    1. The formula handles both categories
    2. If you have the lower of 40 or 40*.9, then 40*.9 will always be lower? (same for 60*.9)

  6. #6
    Registered User
    Join Date
    01-31-2015
    Location
    Melbourne, Australia
    MS-Off Ver
    2007
    Posts
    8

    Re: Using multiple IF and AND

    Sorry, I'm a goose, already taken into account in the second half.. Thanks heaps

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Using multiple IF and AND

    OK good, but what about my point 2 above?
    2. If you have the lower of 40 or 40*.9, then 40*.9 will always be lower? (same for 60*.9)

+ 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: 2
    Last Post: 05-26-2015, 07:29 PM
  2. Multiple cells, multiple sheets, multiple criteria matching
    By Drudnits1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-17-2014, 12:12 PM
  3. Replies: 20
    Last Post: 03-13-2013, 04:15 PM
  4. [SOLVED] Multiple issues - Multiple IF staements with multiple answers, or other coding.
    By inzanesrt4 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2013, 08:53 PM
  5. [SOLVED] Large spreadsheet; multiple scores on multiple dates for multiple students
    By MelindaCapri in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-16-2012, 06:03 PM
  6. Replies: 5
    Last Post: 11-04-2010, 06:02 AM
  7. Replies: 7
    Last Post: 09-15-2005, 05: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