+ Reply to Thread
Results 1 to 5 of 5

Column name look up

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    SF, Ca
    MS-Off Ver
    Excel for Mac 2011
    Posts
    1

    Column name look up

    Hi -
    I would greatly appreciate help with what seems to be an easy question. I'm interested in a formula that will return the column name rather than the number. For example, if I had the data
    A, B, C
    Apples, Bananas, Carrots

    and I wanted to look up the column name for Carrots, what formula would return the value "C"?

    Thanks so much!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Column name look up

    Does this help any?

    http://www.mrexcel.com/forum/showthread.php?t=71978
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Column name look up

    hi look at attachment it works good only for columns with 1 letter.
    Attached Files Attached Files
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  4. #4
    Forum Contributor
    Join Date
    02-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Column name look up

    try this..

    =LEFT(ADDRESS(1,MATCH(C5,1:1,0),4,1),FIND("1",ADDRESS(1,MATCH(C5,1:1,0),4,1),1)-1)

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Column name look up

    If your column names are in row 1 (i.e. A,B,C)and the value you want as a reference is in F12 ("carrots"

    INDEX($A$1:$C$1,MATCH(F12,$A$2:$C$2,0))

    Is that what you are looking for?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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