+ Reply to Thread
Results 1 to 3 of 3

Nested If Function with multiple true results...

Hybrid View

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Angry Nested If Function with multiple true results...

    A simple function for our schedule that sorts how much overtime people have been offered. I'm doing it the long way, and it's probably not the easiest way, but I think it's the simplest. I've gotten really close (it pulls the data, uses large to rank it and then compares Person A's total to the number)

    For example
    Jim 20
    Shannon 37
    Joe 15

    Then it ranks it low to high

    15
    20
    37

    Then it makes a list of names, it does this by using nested if functions, if C1 = B1 then D1 would = Jim, if C1 = B2 then D1 would = Shannon, etc.

    Here's the code I'm using. Only problem is when people have the same amount, in this code Mateo and Shannon have the same amount, so it lists Shannon's name twice in F95 and F96 (this code is repeated 4 times):

    =IF((B94=F96),"Linda",IF((B95=F96),"Shannon1",IF((B96=F96),"Mateo",IF((B97=F96),"Jim K.",""))))

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Nested If Function with multiple true results...

    hi JKeefe56, welcome to the forum. assuming data in A1:B3, try this instead in D1:
    =SMALL($B$1:$B$3,ROWS(D$1:D1))

    then an array formula in E1:
    =INDEX($A$1:$A$3,SMALL(IF($B$1:$B$3=D1,ROW($B$1:$B$3)-ROW($B$1)+1),COUNTIF(D$1:D1,D1)))

    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Nested If Function with multiple true results...

    Thank you so much, that works great!
    Last edited by JKeefe56; 03-07-2013 at 10:25 PM.

+ 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.6.0 RC 1