+ Reply to Thread
Results 1 to 6 of 6

IF formula with many greater then, and less then conditions

  1. #1
    Registered User
    Join Date
    03-18-2005
    Posts
    36

    IF formula with many greater then, and less then conditions

    Hi,

    I'm struggling with this formula and cannot figure this out:

    =IF(G18/2<2;0);IF(G18/2>=2;<3;2);IF(G18/2>=3;<4;3);IF(G18/2>=4;<5;4);IF(G18/2>=5;>6;5);IF(G18/2>=6;<7;6);IF(G18/2>=7;7)))))))


    Basically it it would return the answer based on the number in cell G18 divided by 2, based on:

    If G18/2 is greater than= 7 and above, 7 is the answer
    If G18/2 is greater than= 6 and less then 7, 6 is the answer
    If G18/2 is greater than= 5 and less then 6, 5 is the answer
    If G18/2 is greater than= 4 and less then 5, 4 is the answer
    If G18/2 is greater than= 3 and less then 4, 3 is the answer
    If G18/2 is greater than= 2 and less then 3, 2 is the answer
    If G18/2 is less than 2, 0 is the answer

    Hope somebody could help me out, thanks.
    Last edited by age; 02-23-2023 at 02:21 PM. Reason: bad english

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: IF formula with many greater then, and less then conditions

    Try this:

    =MIN(7,INT(G18/2))

    Hope this helps.

    Pete

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: IF formula with many greater then, and less then conditions

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

  4. #4
    Registered User
    Join Date
    03-18-2005
    Posts
    36

    Re: IF formula with many greater then, and less then conditions

    Wow thank you so much, that worked out brilliantly. That was above my head so now I must figure out how these two formulas work

    Lookup work great, so did Min but give wrong result below 4 ex. 7/2=3,5 then it gives 1 as a result, but should be 0.

    But thanks both so much!

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: IF formula with many greater then, and less then conditions

    A slight amendment to my formula, then:

    =MIN(7,INT(G18/2))*(G18>=4)

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: IF formula with many greater then, and less then conditions

    By the way age welcome to the forum AND
    please update your profile.

    If you are not familiar with how to update your profile find the dark blue menu at the top of this page that says
    Forum Actions
    . Click that and 'Edit Profile'.

    Thank you ahead of time.

+ 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. Greater than and conditions doesnt seem to work
    By ct00010 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2021, 06:49 AM
  2. Replies: 2
    Last Post: 07-26-2020, 06:37 AM
  3. [SOLVED] Add an amount to a cell if the value of one of the conditions is greater than X
    By execlass2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2019, 01:22 PM
  4. [SOLVED] Select Only If No Other Cell is Greater Than X and All Other Conditions are Met
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-05-2015, 08:24 PM
  5. running total with conditions H3 = H2 + G3 if H2 greater than 0 etc.
    By rkobeyer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2013, 02:40 AM
  6. [SOLVED] IF Function with greater than 51 conditions?
    By jivemario in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-31-2012, 02:44 PM
  7. Coding for comparing sections of columns for greater than/less than conditions
    By xburbx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2010, 10:52 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