+ Reply to Thread
Results 1 to 6 of 6

Using index to lookup over large area

  1. #1
    Registered User
    Join Date
    05-27-2007
    Posts
    8

    Using index to lookup over large area

    ----A-----B-----C-----D---
    1--matt--mark--luke--john
    2--500---300---650---150-
    3--432---424---456---124-
    4--numbers here must not be included
    5--354---242---853---123-
    6--654---456---353---242-
    7
    8--=INDEX(A1:D1,MATCH(MAX(A2:D3,A5:D6),A2:D3,A5:D6,0))

    in A8 in my code. Why does it no display the name of the person with highest score in this case luke with 853.

    Can you tell me the code to enter into A8 to display the name of luke. The numbers in row 4 must now be included.

  2. #2
    Registered User
    Join Date
    05-27-2007
    Posts
    8

    how to format numbers when used in formula with =text()

    THIS IS A SEPERATE QUESTION - I still require answer for above question aswell.

    Highest total is $3769000 by PERSON1

    =TEXT("Highest total is $",0)&MAX(B82:O82)&TEXT(" by ",0)&INDEX(B1:O1,MATCH(MAX(B82:O82),B82:O82,0))

    how can i change above formula so cell displays
    Highest total is $3,769,000 by PERSON1

    is it possible to add comma seperators?
    if so how. Be awar that number may change to others like 87424792 and would still need to look like 87,424,792.

    thanks in advance
    Last edited by liamthebof; 05-27-2007 at 03:51 PM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by liamthebof
    Why does it no display the name of the person with highest score in this case luke with 853.

    Can you tell me the code to enter into A8 to display the name of luke. The numbers in row 4 must now be included.
    I assume you mean that the numbers in row 4 must noT be included? If so then try this formula

    =INDEX(A1:D1,MIN(IF((A2:D6=MAX(A2:D3,A5:D6))*(ROW(A2:D6)<>4),COLUMN(A2:D6))))

    confirmed with CTRL+SHIFT+ENTER

    The reason your formula doesn't work is that MATCH function has to have a vector as the second argument, i.e. a single column or row range or array.

    Note: with the formula I suggested if there is a tie it will return the leftmost name of the tiees

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    For your second question try

    ="Highest total is "&DOLLAR(MAX(B82:O82),0)&" by "&INDEX(B1:O1,MATCH(MAX(B82:O82),B82:O82,0))

  5. #5
    Registered User
    Join Date
    05-27-2007
    Posts
    8

    Worked a treat!

    Thank-you very much. You have helped me greatly. Both of the above formulas worked exacly as I wanted them to.

    Respects,
    Liam

  6. #6
    Registered User
    Join Date
    05-27-2007
    Posts
    8

    Hold up

    the second code using dollar gives me the commas i need but adds a Pound symbol to frount of number, any way to get dollar symbol.

+ 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