+ Reply to Thread
Results 1 to 14 of 14

Multiple columns with unique data and return column headers

  1. #1
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Multiple columns with unique data and return column headers

    Hi,

    I have a list of US states on the row 1 and below each row i have multiple customers listed in each columns (about 40 columns). I would like to find an easy way of returning column header into a second worksheet while i try to enter the customer name. This helps me find which state customer would belong to. Can somebody please help me with a macro or code to resolve this problem. Thank you.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,749

    Re: Multiple columns with unique data and return column headers

    A sample sheet would help here

    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple columns with unique data and return column headers

    Hello etaf,

    Attached spreadsheet to get a better idea. Thank you.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    Hello. It is clear what you ask for.

    Now: what is not well understood is why involve a second worksheet.
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    In the attached model you can see two independent filters:

    - State
    - Customer

    In the 'Customer' field you can write a text that is in the middle of the word.

    "Play" with them for a while and then comment, please.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple columns with unique data and return column headers

    Thank you beyond excel. This is exactly what i require. If i may ask as an improvement is there a way we can hide list of customers? Kindly let me know.
    Last edited by gravshi; 03-30-2023 at 08:41 AM. Reason: wrong name quote

  7. #7
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple columns with unique data and return column headers

    I saw your reply in other posts, i would not want to show the list of customers either in final popup screen nor the data base. Just want them to be hidden for confidentiality reasons. Thank you

  8. #8
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    Quote Originally Posted by gravshi View Post
    Thank you beyond excel. This is exactly what i require. If i may ask as an improvement is there a way we can hide list of customers? Kindly let me know.
    In this new model, every time you press -simultaneously- the three keys Ctrl+Shift+Z you will see -alternatively- that the sheet with the data is shown/hidden.
    Attached Files Attached Files
    Last edited by beyond Excel; 03-30-2023 at 10:07 AM.

  9. #9
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple columns with unique data and return column headers

    There seems to be some error.Attached screenshot. Neither customer names nor the column shows up. Thank you.
    Attached Images Attached Images

  10. #10
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    And if you write -only- Aero?...

  11. #11
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple columns with unique data and return column headers

    Nothing comes up, remains blank

  12. #12
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    Quote Originally Posted by gravshi View Post
    Nothing comes up, remains blank
    So upload your implementation on the forum to see where your error is.

  13. #13
    Registered User
    Join Date
    03-29-2023
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    7

    Red face Re: Multiple columns with unique data and return column headers

    Hello Beyond excel, please see error1.png. No matter what i type in customer location, nothing comes up. However if i select the states A,B, C, D, E and F, it would list the whole list of customers associated with it.
    Attached Images Attached Images

  14. #14
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Multiple columns with unique data and return column headers

    Again: Upload your implementation to the Forum to see what you have.

    Two states and five Customers per state will suffice.

+ 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] Syntax for UNIQUE Function reference multiple Table column headers
    By JeffGrant in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2021, 02:46 AM
  2. [SOLVED] Extract multiple row headers and column headers if criteria is met in multiple columns
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-20-2019, 04:56 AM
  3. Replies: 12
    Last Post: 12-19-2017, 12:08 PM
  4. Replies: 8
    Last Post: 09-21-2017, 03:43 PM
  5. Replies: 8
    Last Post: 05-08-2017, 09:17 PM
  6. [SOLVED] Return multiple column headers based on a row value
    By Algolik in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-19-2017, 07:21 PM
  7. Search for value in multiple columns, Return Column Headers
    By Zach51215 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2013, 06:49 AM

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