+ Reply to Thread
Results 1 to 4 of 4

Thread: [SOLVED] 4 Option If function

  1. #1
    Registered User
    Join Date
    12-14-2011
    Location
    Maine
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question [SOLVED] 4 Option If function

    Could someone please help me write an if statement that accomplishes the following.

    If I26 is less than 30% enter 0

    If I26 is greater than 30% but less than 35% enter 2

    If I26 is greater than 35% but less than 40% enter 3

    If I26 is greater than 35% enter 4

    I have been spinning my wheels on this and I keep getting errors.

    Thank you,
    Luke
    Last edited by lchiavelli; 12-20-2011 at 02:34 PM.

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,052

    Re: 4 Option If function

    I assume the last one is supposed to be > 40%. Try this

    =LOOKUP(I26*100,{0,30,35,40;0,2,3,4})

    On the boundary, e.g. 30%, you'll get the higher band.....
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-14-2011
    Location
    Maine
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: 4 Option If function

    That worked perfect and yes you are right, it should have read 40%. Thank you so much! I was way off based with what I was trying.

  4. #4
    Valued Forum Contributor Haseeb A's Avatar
    Join Date
    05-24-2011
    Location
    India | Kwt
    MS-Off Ver
    2007
    Posts
    1,447

    Re: 4 Option If function

    Also, with MATCH ?

    =MATCH(I26*100,{0,30,30,35,40})-1

    Since array is an ascending order added an extra 30.
    HTH; Haseeb

    If your problem is solved, please say so clearly, and mark your thread as Solved:
    Forum Rules & How to Mark a thread as SOLVED

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0