+ Reply to Thread
Results 1 to 2 of 2

Create an array from matching values in multiple columns

  1. #1
    Registered User
    Join Date
    05-16-2019
    Location
    Brighton, England
    MS-Off Ver
    365
    Posts
    1

    Create an array from matching values in multiple columns

    I want to create a table like this (Similar to a pivot table)

    ........Tag1......Tag2......Tag3......Tag4.....Tag5........Tagn
    ID1
    ID2
    ID3
    ID4

    From Data that looks like this:
    (I have an ID field, and 5 columns with an assortment of tags)

    ID#.....TAG......TAG.....TAG.....TAG.....TAG
    ID1......Tag2....Tag5....Tag3....Tag7.....Tagn
    ID2......Tag5....Tag1
    ID3......Tag3
    ID4......Tag6....Tag1...Tag20..Tag8

    I have created one list of Tags and removed duplicates, then transposed them to make them column headings, which has created the structure of the table at the top.
    I have managed to get it working (sort of) by adding the new, complete tags list to the original data and using that as the "Columns" in a pivot and adding each of the tag columns as "Values", but I end up with a table like this:

    .......Tag1.....................................................Tag2.......................................................Tag3 Tag4 Tag5 .... Tagn
    .......TAG.....TAG....TAG....TAG....TAG.............TAG......TAG....TAG....TAG....TAG..............etc.
    ID1...1....................1.........1...........................1..........1.............................1
    ID2..............1.........1.........1.......................................1........1
    ID3..............1.................................................1
    ID4...1.......................................................................1

    ........|_____________________________|
    .........Now I need to group these back into one column, and there are over 600 Tags


    Any idea on a better way of doing this, I'm sure there is a very simple solution I am missing/ unaware of.

    Any help appreciated.
    Last edited by Fresh_Outlook; 05-16-2019 at 06:33 AM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Create an array from matching values in multiple columns

    Hello Fresh_Outlook and Welcome to Excel Forum.
    If the data is in the form shown in the middle of post #1 and you would like to transform it into a pivot table, and since you are using the subscription version (365) of Excel, I feel that using power query to transform the data into normal records then applying a pivot table to that would be a way to go about this.
    If you would like for us to look into the above as a possibility please upload a small desensitized sample of the data along with your expected output (manually typed).
    To upload a sample spreadsheet (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. VBA Sum based on matching values in multiple columns
    By TheOneWeDreamOf in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-23-2019, 08:00 PM
  2. Index array list based on multiple matching Values
    By Jpidge20 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-13-2018, 09:13 PM
  3. Create multiple templates based on matching values
    By ashishmehraitc09 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2017, 09:15 AM
  4. [SOLVED] Matching multiple values in different rows and columns
    By drakaz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2013, 03:26 AM
  5. Replies: 6
    Last Post: 11-15-2012, 12:30 PM
  6. Matching on multiple columns array?
    By vertigo44 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2011, 07:46 AM
  7. Comparing/Matching Values in multiple columns
    By BuddyB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2005, 04:06 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