+ Reply to Thread
Results 1 to 5 of 5

display cell data in relation to previous cell.

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

    display cell data in relation to previous cell.

    OK i am trying to display a name in a cell due to the number in the cell next to it.

    e.g

    A B
    1 person1 500
    2 person2 250
    3 person3 340
    4 person4 700
    5
    6
    7 highest score: =max(B1:B4)
    8 scored by (what code here=to display person4)

    what code needed in cell B8 to display the person who has the highest score shown in the cell above.

    Is this possible with vlookup?

    Thanks in Advance

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =INDEX(A1:A4,MATCH(A7,B1:B4,0))

    OR

    =INDEX(A1:A4,MATCH(MAX(B1:B4),B1:B4,0))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    05-27-2007
    Posts
    8
    Ok thanks, it works now.
    BTW does vlookup only work if the names\score were the opposite way round?

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Here is some info on Vlookup

    http://www.contextures.com/xlFunctions02.html


    VBA Noob

  5. #5
    Registered User
    Join Date
    05-27-2007
    Posts
    8
    OK seeing as you are an excel uber,

    ok i have a set of numbers vertical enetered in cells.
    below these i have =average(a1:a7)
    i have a few columns like this.
    before i add figures to be averaged i get #DIV/0! in the cell. this chages when i add numbers in cells above. Is there any way to just display 0 is this cell?

    EDIT!

    No worries, ISERROR, solved above problem
    Last edited by liamthebof; 05-27-2007 at 02:49 PM.

+ 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