+ Reply to Thread
Results 1 to 13 of 13

Less than and Greater than

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    10

    Less than and Greater than

    Hi

    Im having trouble with a formula. Please help.

    In cell H5 I need a formula that will work out the following.

    If H4 = 0-1000 it must read £10
    If H4 = 1001-1800 it must read £5
    If H4 = 1801+ it must read £0

    Thanks

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Less than and Greater than

    =lookup(h4,{0,1001,1801},{10,5,0})
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,902

    Re: Less than and Greater than

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



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-09-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    10

    Re: Less than and Greater than

    Legend

    Thanks

  5. #5
    Registered User
    Join Date
    09-09-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    10

    Re: Less than and Greater than

    Ok, That seemed a little easy for you. Lol

    Perhaps I could simplify the whole thing im trying to do.

    Cell B1 is either going to be under 1000, between 1001 and 1800, or over 1801

    If B1 is under 1000 and
    If H4 = 0-1000 it must read £17
    If H4 = 1001-1800 it must read £10
    If H4 = 1801+ it must read £0

    If B1 is Between 1001 and 1800 and
    If H4 = 0-1000 it must read £10
    If H4 = 1001-1800 it must read £5
    If H4 = 1801+ it must read £0

    If B1 is over 1801 and
    If H4 = 0-1000 it must read £0
    If H4 = 1001-1800 it must read £0
    If H4 = 1801+ it must read £0

    Hope that's clear.

    Thanks

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Less than and Greater than

    Try

    =IF(B1<1000,IF(AND(H4<=1000,H4>=0),17,IF(AND(H4<=1800,H4>=1001),10)),IF(B1<=1800,IF(AND(H4>=1001,H4<=1800),5),0))

  7. #7
    Registered User
    Join Date
    09-09-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    10

    Re: Less than and Greater than

    That returns a FALSE answer.

  8. #8
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Less than and Greater than

    tRY

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  9. #9
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Less than and Greater than

    Quote Originally Posted by neilbexton View Post
    That returns a FALSE answer.
    Try this (I updated the formula, you may have entered my earlier one which wasnt working. This one provides a value rather than FALSE)

    =IF(B1<1000,IF(AND(H4<=1000,H4>=0),17,IF(AND(H4<=1800,H4>=1001),10)),IF(B1<=1800,IF(AND(H4>=1001,H4<=1800),5),0))

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,902

    Re: Less than and Greater than

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



    Regards, TMS

  11. #11
    Registered User
    Join Date
    09-09-2014
    Location
    London
    MS-Off Ver
    2013
    Posts
    10

    Re: Less than and Greater than

    This works on all except if the B1 (B2 as you have put) is 999 or less. How would I correct it?

  12. #12
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Less than and Greater than

    Try

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

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,902

    Re: Less than and Greater than

    And the other solutions?

+ 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. [SOLVED] count values greater 2 or greater in a column.
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 09-16-2014, 07:05 PM
  2. Replies: 5
    Last Post: 05-04-2012, 06:39 PM
  3. Getting greater value
    By Roadrunner68 in forum Excel General
    Replies: 1
    Last Post: 05-09-2011, 04:17 PM
  4. Greater than or Less than.. If Greater Need Difference
    By lemondrplvr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2010, 02:39 AM
  5. Replies: 4
    Last Post: 08-25-2009, 06:39 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