+ Reply to Thread
Results 1 to 8 of 8

If function, multiple conditions

Hybrid View

  1. #1
    Registered User
    Join Date
    10-15-2017
    Location
    Bangalore, India
    MS-Off Ver
    Ms office 10
    Posts
    35

    If function, multiple conditions

    Hi...

    Could you please help me to apply IF function with multiple conditions?

    If the value in column D is in between 1 and 2, need "40" in column E.
    If the value in column D is in between 2 and 5, need "80" in column E.
    If the value in column D is in between 5 and 10, need "80" in column E.

    I have attached the file and conditions are also described in it. Please help me to find a solution!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,424

    Re: If function, multiple conditions

    Try

    =IF(D2<=1,40,IF(D2<=2,80,IF(D2<=5,120,IF(D2<=10,160,200))))

  3. #3
    Registered User
    Join Date
    10-15-2017
    Location
    Bangalore, India
    MS-Off Ver
    Ms office 10
    Posts
    35

    Re: If function, multiple conditions

    Hi John,

    Sorry... It is not working. I got 200 in all cells. Could you please help me with other formula?

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: If function, multiple conditions

    You can use a LOOKUP formula to do this.
    Formula: copy to clipboard
    =LOOKUP(D2,{0,1,2,5,10},{40,80,120,160,200})

    The first parameter is the value you want to check. (D2 in this case)
    The second is an array of the lower limit of each grouping, e.g. 0 years, 1 year, 2 years, 5 years, 10 years.
    The third is the result array, with each result linked to that same position in the first array, e.g. 0 --> 40, 1 --> 80, 2 --> 120, etc.

  5. #5
    Registered User
    Join Date
    10-15-2017
    Location
    Bangalore, India
    MS-Off Ver
    Ms office 10
    Posts
    35

    Re: If function, multiple conditions

    Hi Paul,

    It is also working. Thank you so much for your help.
    Last edited by melbin; 08-26-2021 at 02:38 PM.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,424

    Re: If function, multiple conditions

    See attached!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-15-2017
    Location
    Bangalore, India
    MS-Off Ver
    Ms office 10
    Posts
    35

    Re: If function, multiple conditions

    Thank you so much, John. It is working...!!!

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,424

    Re: If function, multiple conditions

    Look at results for 1,2 and 5 years with each formula : one of them is wrong as the results are different!

+ 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. IF function with multiple conditions
    By szuruburru in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2020, 09:35 AM
  2. [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
  3. multiple conditions which function to use
    By bbis21 in forum Excel General
    Replies: 7
    Last Post: 11-20-2014, 09:42 PM
  4. [SOLVED] Multiple conditions in if function
    By GIS2013 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-17-2013, 07:53 AM
  5. Multiple conditions for if function
    By jiyan200 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-12-2012, 11:12 AM
  6. multiple conditions on an If function.
    By hedgefund in forum Excel General
    Replies: 1
    Last Post: 04-21-2010, 09:42 PM
  7. IF Function - Multiple Conditions
    By jdavidson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2007, 12:10 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