+ Reply to Thread
Results 1 to 9 of 9

Return column header instead of column number.

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Return column header instead of column number.

    I am using this code
    Please Login or Register  to view this content.
    But I'd like it to return the column header instead of just the column number. Can this be done?

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Return column header instead of column number.

    When you say column header, do you mean the column letter, or do you mean the value in a header row?

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Return column header instead of column number.

    Value of the header, like on a table.

  4. #4
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Return column header instead of column number.

    What do you mean by "column header"?

    If you mean the column letter you'd use the "ADDRESS" function. In its most basic form the syntax is "ADDRESS(row_num, column_num)", so

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    will provide the address of the cell found. Trim the number off the end, and you've got your column letter.

    Tim
    Never stop learning!
    <--- please consider *-ing !

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Return column header instead of column number.

    Ok, how about
    =INDEX(DX$5:FK$5,MATCH("USA",DX6:FK6,0))

    Assuming your header is in row 5

  6. #6
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Return column header instead of column number.

    Perfect! That's exactly what I needed!

  7. #7
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Return column header instead of column number.

    Haha! Fluff13 got there first!

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Return column header instead of column number.

    Not sure who your referring to, but glad to help & thanks for the feedback.

  9. #9
    Registered User
    Join Date
    06-12-2012
    Location
    Wichita, Kansas
    MS-Off Ver
    Excel 2010, 2016, 2021-22
    Posts
    87

    Re: Return column header instead of column number.

    Quote Originally Posted by Fluff13 View Post
    Not sure who your referring to, but glad to help & thanks for the feedback.
    To you, lol. It was exactly what I was after!

+ 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. Lookup to return Column Header when column data is not 0
    By ec4excel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-25-2019, 09:14 AM
  2. [SOLVED] Find the last empty column in a row, return column header
    By Thierry311 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2019, 08:27 PM
  3. Replies: 8
    Last Post: 03-23-2017, 02:59 PM
  4. Replies: 5
    Last Post: 02-13-2014, 05:37 PM
  5. Replies: 3
    Last Post: 02-11-2014, 12:41 PM
  6. Return column header based on column criteria and number value
    By bwill22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2014, 07:33 PM
  7. [SOLVED] Formula to find first negative number in row and return column header
    By spoonedmango in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-09-2012, 02:08 PM

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