+ Reply to Thread
Results 1 to 8 of 8

2nd Nth Indexed Value

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    Eureka Springs, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    2nd Nth Indexed Value

    Column D contains team names. Column E contains team rating values.

    Column G contains the following formula beginning at G2 to sort the values in Column E high to low -
    =LARGE($E$2:$E$245,ROW()-1)

    Column F contains the team names from Column D that correspond to the appropriate ordered ratings in Column G with the following formula beginning at F2 -
    =INDEX($D$2:$E$245,MATCH(G2,$E$2:$E$245,0),1)

    In the instance that a rating is duplicated, the first alphabetic name of a team with that rating is listed twice. Is there a simple way to list the last team name alphabetically instead? Can it be done within the existing Column F formula such that if G34 contains a rating identical to G33 -
    =IF(G34=G33,...,INDEX($D$2:$E$245,MATCH(G34,$E$2:$E$245,0),1)) ?

    Also, I have heard that ROW() empty can cause problems. What is the solution to avoid such?

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: 2nd Nth Indexed Value

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    04-30-2012
    Location
    Eureka Springs, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: 2nd Nth Indexed Value

    See the attached worksheet.

    Again, G is listed using Large, high to low. F is the team Indexed from Column D with the rating from G.

    As can be seen here, Green appears twice. The occurrence of two identical ratings in my data is unlikely but a concern since the values are indexed and each team must be represented. I've seen a number of methods that can be used to list all teams. However, I would prefer to set up IF statement criteria if it can be done.

    Again, I would like to utilize a formula so that in the example above, the formula in F5 would be -
    =IF(G5=G4,...,INDEX($D$2:$E$7,MATCH(G5,$E$2:$E$7,0),1))
    with the IF criteria causing the last team alphabetically with a rating of 26 to be listed because it matches whatever criteria is required. In this example, Purple follows Green alphabetically so it would meet the criteria.

    I hope that's clearer.
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: 2nd Nth Indexed Value

    In F2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it down...

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

  5. #5
    Registered User
    Join Date
    04-30-2012
    Location
    Eureka Springs, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: 2nd Nth Indexed Value

    Entered just as shown as an array formula I get a #NAME? error.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: 2nd Nth Indexed Value

    Just remove the Iferror() function from the suggested formula since it's a new arrival in 2007.

    =INDEX($D$2:$D$7,SMALL(IF($E$2:$E$7=$G2,ROW($E$2:$E$7)-ROW($E$2)+1),COUNTIF($G$2:$G2,$G2)))

  7. #7
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: 2nd Nth Indexed Value

    Sixthsense is 100% right.

    One small modification.

    Instead of using 'Iferror', i have tried Conditional formatting. (Michael is using Excel-2003)
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  8. #8
    Registered User
    Join Date
    04-30-2012
    Location
    Eureka Springs, AR
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: 2nd Nth Indexed Value

    That did it.

    Thanks for the help, Sixthsense!

+ 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] Indexed count and label
    By K.J.Dub in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-04-2013, 12:06 PM
  2. Showing indexed content
    By altotoe in forum Excel General
    Replies: 3
    Last Post: 01-24-2012, 02:30 AM
  3. Entering value at indexed location
    By Apel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2009, 04:32 PM
  4. Replies: 1
    Last Post: 05-17-2005, 03:06 PM
  5. indexed line chart?
    By Xaver Hinterhuber in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-22-2005, 11:06 PM

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