+ Reply to Thread
Results 1 to 4 of 4

Thread: Lookup in a table

  1. #1
    Registered User
    Join Date
    07-04-2009
    Location
    New Delhi
    MS-Off Ver
    Excel 2007
    Posts
    10

    Lookup in a table

    I have a table of this format:
    d e f
    a 1 2 3
    b 4 5 6
    c 7 8 9

    Now i want to find the column title for a particular value in the table. For ex, corresponding to row 'b' and value '5', how to get 'e'?? I am a beginner. Please help.

    TIA
    Last edited by prabodh1234; 07-06-2009 at 03:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2003
    Posts
    270

    Re: Lookup in a table

    how about ?

    =INDEX(A1:D1,1,SUM(TRANSPOSE((A2:D4=5))*ROW(1:4)))

    Committed with Ctrl+Shift+Enter

    HTH,
    windknife

  3. #3
    Registered User
    Join Date
    07-03-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Lookup in a table

    I will assume that your 'd', 'e' and 'f' are in cells B1, C1 and D1, and that 'a', 'b' and 'c' are in A2, A3 and A4.

    Then to get the name the header corresponding to the 5 in row "b" you need to write:

    =INDEX(B1:D1, 1, MATCH(5, OFFSET(B1:D1, MATCH("b", A2:A4, 0), 0), 0))

    Alternatively, if you need to find the name of the header above the number 5 without knowing which row it's in, and are sure that there is only one number 5 in the table, then use windknife's method.

  4. #4
    Registered User
    Join Date
    07-04-2009
    Location
    New Delhi
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Lookup in a table

    Thanks guys...yes it worked

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