+ Reply to Thread
Results 1 to 11 of 11

Creating table from data in columns

  1. #1
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Creating table from data in columns

    Hello all,

    I am really sorry if this was already discussed in previous threads, but I am straggling to find out how to name this sort of problem I have (if so, please send a link to relevant thread).

    I do have information in 3 different columns (Name, department, position) and I have to create a table from these data, where rows will show department, column will show positions and values inside the table will be names (divided there based on dep. and position). Of course there can be more people with same position in same department so I would need table to show more cells for that combinations of DEPxPOS in this case.

    I would really appreciate your help here. Thank you.
    Maros

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Creating table from data in columns

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating table from data in columns

    Excel attached
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Creating table from data in columns

    In G3 copied across and down:

    =LOOKUP(2,1/(($B$2:$B$23=$F3)*($C$2:$C$23=G$2)),$A$2:$A$23)

  5. #5
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating table from data in columns

    This would work if there was only one name for specific DEPxPOS combination. This way excel just picked up last name from that list for combination where there are more of them. For example, for Associate from Finance, excel picked up only Erik, but I need all names for each department, so in this case Anna and Erik. Another example is Weld Associate, now I have only Robert, but in reality Jack, Jasmine and Robert are working there.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Creating table from data in columns

    Well, if you'd mocked up your expected results, as you are asked to do in the instructions up top, I'd have known this. What you gave us instead was a red rectangle with nothing in it, so I had to hazard a guess. Did I waste my time???

  7. #7
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating table from data in columns

    Sorry, I thought it will be clear from my first post, but maybe I haven't explained it correctly. I attached new excel sheet with expected results in red, I am looking for some formula (if it is even possible) which will help me to get this result. If it is not possible to get more names in one cell, maybe there is a way to do it with multiple cells for one POSITIONxDEPARTMENT combination?

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: Creating table from data in columns

    Where is the updated workbook?

  9. #9
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating table from data in columns

    Sorry my bad
    Attached Files Attached Files

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,309

    Re: Creating table from data in columns

    give the attached a try - macro on green button
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-11-2020
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating table from data in columns

    Hi, that works great! Of course, this was only fictional data and for our purposes we will have to extend range of data (now it is working till row 23) and also add new positions an departments. Is there any way we can manage it by ourselves?

+ 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. Creating a Pivot Table efficiently from 300 columns?
    By Cam in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-25-2017, 12:22 PM
  2. Creating a Pivot Table to display columns of data issue
    By Sven.Bassett in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-18-2016, 04:46 AM
  3. Creating a Pivot table from data with Sub columns/headers
    By taketad in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-26-2016, 11:20 PM
  4. [SOLVED] Pivot Table creating numerous columns instead of summing data correctly
    By okcsteve in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 11-13-2014, 10:33 AM
  5. Replies: 4
    Last Post: 06-11-2013, 02:16 PM
  6. [SOLVED] combine many columns data into half columns data by creating rows
    By killerware in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-08-2013, 07:53 AM
  7. Creating table out of columns of data with macro
    By Jszota in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2011, 10:52 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