+ Reply to Thread
Results 1 to 4 of 4

multiple if statements for condition

  1. #1
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    225

    multiple if statements for condition

    i cant figure out an if statement for a range of numbers



    what i need is:

    if HU$2*HU$23<50, display 3
    if HU$2*HU$23>50, but less than 101, display 2.5
    if HU$2*HU$23>100, but less than 201, display 1.75
    if HU$2*HU$23>200, but less than 301, display 1.5
    if HU$2*HU$23>300, but less than 401, display 1.25
    if HU$2*HU$23>400, display 1.15

    thank you for any help
    Last edited by kamelkid2; 01-17-2011 at 03:11 PM.

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

    Re: multiple if statements for condition

    Try this

    Please Login or Register  to view this content.
    However, this may not be exactly what you need because your description does not address one boundary condition. What do you want to happen when the value is exactly equal to 50?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    225

    Re: multiple if statements for condition

    that was an oversight on my part. ill change on of the conditions to 51 or 49.

    i did however get it to work with something like this:

    =IF(HU$2*HU$23>=450, "1.15", IF(HU$2*HU$23>=300, "1.5", IF(HU$2*HU$23>=200, "1.75", IF(HU$2*HU$23>=100, "2", "3" ) ) ) )

    but i will try out your programming as it seems much more efficient and easier to look back at 2 years from now

  4. #4
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    225

    Re: multiple if statements for condition

    yes what you have supplied me work perfectly. thank you so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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