+ Reply to Thread
Results 1 to 6 of 6

Find name and return header

  1. #1
    Registered User
    Join Date
    01-07-2015
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Find name and return header

    Hi all,

    I am having trouble working out this problem...

    New Picture.jpg

    I need to input 2 references (green and red): 1 from the green table, and other from the red column. The result should be one of the numbers in black of the heading.

    I would appreciate it if you could offer some help. Thank you!
    Last edited by Gerardo83; 01-07-2015 at 09:12 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Find name and return header

    I'm not sure what the purpose is of the red entry, as it seems to have no effect on the result. In H2 you can have this formula:

    =IF(E2="","",IF(ISNUMBER(MATCH(E2,B$2:B$5,0)),1,IF(ISNUMBER(MATCH(E2,C$2:C$5,0)),2,"")))

    Hope this helps.

    Pete

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,370

    Re: Find name and return header

    Why you have "Car" but with "B" not "A", still don't get it, another try with array formula:

    =INDEX(B1:C1,MATCH(E2,INDEX(B2:C5,MATCH(F2,A2:A5,0),)))

    in condition you have "Car" and "A" (need in the same row)

  4. #4
    Registered User
    Join Date
    01-07-2015
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Find name and return header

    Thank you for your help!

    You´re right Pete the first column is inneccesary. Since all the values in green are different, I could just omit the red values to get the heading result. One question though, would this last formula be valid for such scenario?

    =INDEX(B1:C1,MATCH(E2,INDEX(B2:C5,MATCH(F2,A2:A5,0),)))

    Your help is very appreciated.

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,370

    Re: Find name and return header

    If you just looking header (1 or 2) with condition "Car", change formula to:

    =INDEX(B1:C1,MAX(IF(B2:C5=E2,COLUMN(B1:C1)-COLUMN(B1)+1)))

    still array formula (means press CTRL+SHIFT+ENTER button together)

  6. #6
    Registered User
    Join Date
    01-07-2015
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Find name and return header

    That works great Azumi!

    Not to be a pain over this again thread, but I just wanted to make a final question again.

    How could I get the column heading if I have multiple columns (from 1 to 100) as shown below?

    New Picture (1).jpg

    I understand this is becoming kind of annoying for you guys. Sorry and thank you for your patience and understanding.


+ 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] Find name in a table and return the column header
    By rodgersmg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2014, 08:59 AM
  2. [SOLVED] Find last entry in row and return column header name
    By cralph78 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-06-2014, 05:34 AM
  3. [SOLVED] Find last entry in row and return column header
    By cralph78 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-01-2014, 08:26 AM
  4. [SOLVED] Find specific value in table and return header row and header column value
    By nelwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2013, 01:35 AM
  5. Find a value and return value of the row and column header
    By JG2011 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-31-2011, 03:48 AM

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