+ Reply to Thread
Results 1 to 4 of 4

Newbie Needs "If greater than, but less than" statement" Formula Help

  1. #1
    Registered User
    Join Date
    02-08-2017
    Location
    Sacramento, CA
    MS-Off Ver
    Office 2013
    Posts
    2

    Newbie Needs "If greater than, but less than" statement" Formula Help

    I need a formula in cell J3 that says:
    "IF cell I3 is greater than or equal to 22.51 but less than or equal to 30, "65"
    or if cell IF cell I3 is greater than or equal to 15.01 but less than or equal to 22.50, "70"
    or "IF cell I3 is greater than or equal to 13.51 but less than or equal to 15, "77.5"

    (there are six more value ranges / answers that would go beyond this).

    I was trying something like this a partial formula to test but it doesn't seem to work:

    =IF(AND(I3>=22.5,I3<=30,"65"),IF(I3>=15.01,I3<=22.5,"70"))

    Please help.

    Thanks, Mark

  2. #2
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Newbie Needs "If greater than, but less than" statement" Formula Help

    Try...

    =IF(AND(I3>=22.5,I3<=30),"65", IF(AND(I3>=15.01,I3<=22.5),"70", IF(AND(I3>=13.51,I3<=15),"77.5", "No Match")))

    Edit: Lets try to explain this in a little more detail and hope that the site doesnt crash again. :-)

    The way an IF statement works in Excel is as such...

    =IF("This is true", "Do this", "Else do this")

    AND works like this...

    =AND("If this is true", "and this is true", "and this is true", "etc") return "TRUE"

    What you did in your formula is conflate the parameters of the IF and AND function, specifically the "65" [AND(I3>=22.5,I3<=30,"65")]. That belongs outside the AND parentheses but within the IF's, as such...

    IF(AND(I3>=22.5,I3<=30),"65")

    Note that in the above the only parameters we are using are...

    =IF("This is true", "Do this")

    In my corrected formula you will notice that I am nesting IF statements...

    =IF("This is true", "Do this", IF("This is true", "Do this", IF("This is true", "Do this", "Else do this")))

    Make sure you keep track of your parentheses. Excel will try to help but doesn't always do so accurately.
    Last edited by McStagger; 02-08-2017 at 05:00 PM.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Newbie Needs "If greater than, but less than" statement" Formula Help

    Here is a formula that is a little easier to expand but isn't necessarily "better."

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


    If your data is in increments of 0.01 then add 0.01 to the upper limit of each range, as shown.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  4. #4
    Registered User
    Join Date
    02-08-2017
    Location
    Sacramento, CA
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Newbie Needs "If greater than, but less than" statement" Formula Help

    It works. Thank you very much. And thanks for the lesson.

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] IF Formula not working - need to return "NO" if cell is 1% greater or "YES" if less 1%
    By maryren in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-26-2013, 11:34 AM
  3. [SOLVED] Combine "=IF" and "=HOUR" statement for cell formula
    By chriswhite1982 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2013, 02:42 PM
  4. [SOLVED] Cell Formula to count time with "Greater Than or Equal to" and "Less Than"
    By chriswhite1982 in forum Excel General
    Replies: 3
    Last Post: 06-16-2013, 12:30 AM
  5. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  6. Replies: 3
    Last Post: 12-14-2006, 01:36 PM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM

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