+ Reply to Thread
Results 1 to 3 of 3

IF, OR, AND - Referencing a cell less than, greater than

  1. #1
    Registered User
    Join Date
    08-25-2021
    Location
    UK
    MS-Off Ver
    MS Office for Mac v16.52
    Posts
    1

    Smile IF, OR, AND - Referencing a cell less than, greater than

    Hi all,

    First question here, please be kind as my stupidity is already well known to me!

    I am trying to obtain a cell value of 4 different bands using the value of a cell either being less than or greater than the limit of each of those bands. I am trying to use the IF, AND, OR function but to no avail.

    e.g

    Band 1 - 0% (B4) = up to 12,570 (B5)
    Band 2 - 20% (C4) = up to 50,270 (C5)
    Band 3 - 40% (D4) = up to 150,000 (D5)
    Band 4 - 45% (E4) = greater than 150,000 (D5)

    Cell Value = 50,000 (B8)

    If B8 is equal to or less than 12,570 display 0% (B4)
    If B8 is greater than 12,570 but equal to or less than 50,270 display 20% (C4)
    If B8 is greater than 50,270 but equal to or less than 150,000 display 40% (D4)
    If B8 is greater than 150,000 display 45% (E4)

    Result should = 20% (C4)

    So far my attempt is:
    =IF(or(and(b8<b5,"B4"),and(b8>b5,b8<c5,"C4"),and(b8>c5,b8<d5,"D4"),and(b8>d5,"E4"))))

    As you can probably guess, that formula is not working!

    I would really appreciate learning how to make this work. Is anyone able to explain what I am doing wrong?

    Many thanks!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,186

    Re: IF, OR, AND - Referencing a cell less than, greater than

    Welcome to the forum.

    There will be simpler ways, but try this:

    =IF(B8<B5,B4,IF(AND(B8>B5,B8<C5),C4,IF(AND(B8>C5,B8<D5)D4,E4)))
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    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
    30,917

    Re: IF, OR, AND - Referencing a cell less than, greater than

    Use "lookup" table in A4:B7

    0 0.00%
    12571 20.00%
    50271 40.00%
    150001 45.00%

    =VLOOKUP(B1,$A$4:$B$7,2,1)

    b1=50000

+ 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. SUMIFS Greater/Less Than and Referencing Date
    By cartica in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-31-2020, 07:19 PM
  2. Replies: 2
    Last Post: 07-26-2020, 06:37 AM
  3. [SOLVED] find value which is greater than in a range of cells and return the greater value
    By green369 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2015, 02:46 AM
  4. [SOLVED] Icon sets for greater than, equal to, and less than for referencing another cell
    By jxsavage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-28-2013, 06:06 AM
  5. Replies: 0
    Last Post: 01-09-2013, 06:58 AM
  6. Replies: 4
    Last Post: 08-25-2009, 06:39 AM
  7. Lookup referencing cell referencing range
    By cmcconnehey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-15-2008, 06:19 PM

Tags for this Thread

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