+ Reply to Thread
Results 1 to 9 of 9

2 dimension / 3 category data into a 3 column list

  1. #1
    Registered User
    Join Date
    03-02-2016
    Location
    SF Bay Area
    MS-Off Ver
    Various
    Posts
    3

    Question 2 dimension / 3 category data into a 3 column list

    'Sheet One' has a bunch of data. Column A is a list of Authors and Row 1 is a list of years. Each cell from B2 (over and down) indicates the title of an article that an author submitted in a particular year. For example, B1 shows the author James Johnson, A2 states 1905, A3 states 1906, cell B2 states the name of the article James Johnson wrote in 1905, and B3 states the article James Johnson wrote in 1906. All articles are unique. There are over a hundred columns and over a thousand rows. Many cells are blank (meaning there was no article for that author in that year).

    What I want to generate is a three column list on Sheet 2. Each article will appear on the list. The second column will indicate who wrote each article. The third column will indicate the year it was written. I don't care about the order that the articles are listed, and can tolerate there being blank rows. Any ideas on how to generate the list?

    The second trick here is I need to be able to swap in new data and generate a new list. In other words, I'd like to be able to past all new data on Sheet 1 and generate a brand new list for a different set of authors and articles.

    Any ideas? This can't be a unique problem, but I can't find attempts to do something like this elsewhere...

    Edit: I've attempted to attach a sample mockup of the problem. Sheet 1 has a sample of the data. Sheet 2 has an example of the results I want to generate.
    Attached Files Attached Files
    Last edited by jgsugden; 03-03-2016 at 08:15 PM. Reason: Editied to attach worksheet with mock up of data

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,982

    Re: 2 dimension / 3 category data into a 3 column list

    It would be very helpful if you supplied a sample worksheet, not the full worksheet so that we can write some code and test it.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and scroll down to Manage Attachments to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    03-02-2016
    Location
    SF Bay Area
    MS-Off Ver
    Various
    Posts
    3

    Re: 2 dimension / 3 category data into a 3 column list

    Added the worksheet.... No ideas?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,889

    Re: 2 dimension / 3 category data into a 3 column list

    I don't know how others would do it, but I would use the INDEX() function. Something like this:
    Please Login or Register  to view this content.
    That's how I'd probably do it.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    03-02-2016
    Location
    SF Bay Area
    MS-Off Ver
    Various
    Posts
    3

    Re: 2 dimension / 3 category data into a 3 column list

    Thanks.
    That gives me three columns with the correct data in them, but a lot of extra unnecessary lines. I have an inelegant, but workable, solution to get around that, though.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: 2 dimension / 3 category data into a 3 column list

    Something like this could work if you expand the formula to accommodate more than 2 books. This would result in a long formula with many IFERROR statements to accommodate the extra columns.
    To collapse the horizontal arrangement to get rid of blanks enter this where you would want the condensed matrix of author and books
    Enter with Ctrl + Shift + Enter
    I entered this in A15 and filled down and across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the years for the above (references would have to be changed to match the array location
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    There are other formulae in the workbook enclosed.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: 2 dimension / 3 category data into a 3 column list

    Here is my first reply filled out to accommodate the data range that you have laid out. This makes use of tables and then filtering out the blank rows. There are strange results without the filtering but the filter takes care of that.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,889

    Re: 2 dimension / 3 category data into a 3 column list

    Quote Originally Posted by jgsugden View Post
    Thanks.
    That gives me three columns with the correct data in them, but a lot of extra unnecessary lines. I have an inelegant, but workable, solution to get around that, though.
    I'm sure a filter operation would get rid of the empty lines.

  9. #9
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: 2 dimension / 3 category data into a 3 column list

    If you are willing/allowed to use VBA, check out this approach.
    Click button on sheet "Results"

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Replies: 1
    Last Post: 12-12-2015, 11:45 AM
  2. [SOLVED] Need data to show by selecting a category in a drop down list
    By uahmed90 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2015, 01:30 AM
  3. How to list data by category in date order taken from one worksheet to another
    By Don Harrison in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-28-2014, 10:58 AM
  4. Replies: 17
    Last Post: 12-29-2013, 10:28 PM
  5. Separate data list into 3, depending on the category in column 2
    By dr.rohit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2012, 05:36 AM
  6. Replies: 12
    Last Post: 07-21-2011, 09:29 PM
  7. [SOLVED] Can Excel Data be simultaneously entered in seperate category list
    By bgghunter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-30-2006, 07:50 PM

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