+ Reply to Thread
Results 1 to 8 of 8

[Macro Help] Search Column in a Table and Return Heading

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    5

    [Macro Help] Search Column in a Table and Return Heading

    Lets see if I can put this into words.

    I am trying to find matches of a specific cell in various columns. Example: Cell A1 holds the word "Abc123" I'd want to search columns B-H, for an exact or similar match and return the heading for that column.

    So the results would show me the COLUMN Heading for anything that reads: abc123, ABC123, AbC123, aBC123.

    Is this possible?

    Thanks in Advance!

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: [Macro Help] Search Column in a Table and Return Heading

    Hi

    This assumes that there will only be one match (if any). If there is likely to be multiple matches, then how do you want to progress?

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: [Macro Help] Search Column in a Table and Return Heading

    There will be one match in each column.

    Header 1 -------Header 2----------Header 3
    ABC123---------abc123-----------abd123
    abd123---------hjk321------------hdn234
    Abc123---------dsd123-----------sds332

    If I searched for the value abc123 I want it to return Headers 1 and 2. It would not matter if the same value is in one column multiple times

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: [Macro Help] Search Column in a Table and Return Heading

    Also, because there will be multiple lines returned, I would want it returned to a column in excel.

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: [Macro Help] Search Column in a Table and Return Heading

    Hi

    Exactly where do you want it returned?

    Same sheet as the data? If so where?

    rylo

  6. #6
    Registered User
    Join Date
    10-29-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: [Macro Help] Search Column in a Table and Return Heading

    Quote Originally Posted by rylo View Post
    Hi

    Exactly where do you want it returned?

    Same sheet as the data? If so where?

    rylo
    Nowhere specific as long as it's in excel. If it can be put in the same sheet fine. I just need to get the overall headers that match the given value.

  7. #7
    Registered User
    Join Date
    10-29-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: [Macro Help] Search Column in a Table and Return Heading

    Can anyone help with this?

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: [Macro Help] Search Column in a Table and Return Heading

    Hi

    Put up an example file that shows your structure.

    rylo

+ 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