+ Reply to Thread
Results 1 to 8 of 8

Merging Columns and Rows of Data into a Matrix

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Merging Columns and Rows of Data into a Matrix

    Hi,

    I've been trying unsuccessfully to find a way to merge data into a matrix, but can't quite figure out a way to manage it. I have a list of employees in column A, in the list there are employees, many with multiple instances, and in columns C onwards there are dates in dd/mm/yyyy format.

    Each line represents the number of nights in a trip, from 1 to 35 nights and the start to finish dates. Where as some employees may only have one row with one date others may have 20 rows with between 2 to 35 dates.

    I'd like to merge this into a matrix with one line for each employee showing which nights in the year they were away (tab matrix) which has a day of the year to illustrate which employees were away on which nights of the year.

    I've uploaded an example to highlight what I mean.

    I've tried a pivot and an index match formula but couldn't get either to work.

    Any help would be much appreciated.

    Thanks

    David
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Merging Columns and Rows of Data into a Matrix

    Well, here is a start. Autofilter is a useful tool here, especially on the rightmost column. Just filter on NOT "-" and you get a summary.
    I transposing the data makes sense to me, it makes it more compact. I'm not sure how many employees you have and how much you expect that number to increase but the date increases everyday making it awkward to have horizontal.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Merging Columns and Rows of Data into a Matrix

    Thanks Jacc,

    Your help is much appreciated. I'll try and put your solution into production with my dataset tomorrow. In the interim I'll leave the post unsolved, but I think this will do just nicely.

    Thanks

    David

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Merging Columns and Rows of Data into a Matrix

    Again, I forgot to mention that this is an array formula, has to be entered with Ctrl + Shift + Enter.
    Looking forward to hear from the full scale test.

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Merging Columns and Rows of Data into a Matrix

    There was an embarrassing error in that workbook, I'm afraid. The top 10 rows or so contained a non working version of the formula. Here it is again, corrected. Sorry for any inconvenience.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Merging Columns and Rows of Data into a Matrix

    Here is a version with a formula for only picking out relevant dates. I does the same as you can do with the Autofilter but if you have tonnes of data this can reduce the calculation time since you only need to copy the formulas as far down as getting the "-" result. Note that the first cell in the date column has a different formula.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Merging Columns and Rows of Data into a Matrix

    Hi Jacc,

    I tried the solution over my data set and it worked perfectly.

    Many Thanks for helping me out.

    David

  8. #8
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Merging Columns and Rows of Data into a Matrix


    ''''''''''''

+ 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: 2
    Last Post: 02-11-2014, 05:05 AM
  2. [SOLVED] Merging rows and moving data to columns
    By ranmyaku in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-03-2013, 01:48 PM
  3. Replies: 4
    Last Post: 01-16-2013, 10:06 PM
  4. Replies: 8
    Last Post: 09-13-2012, 09:32 AM
  5. Merging Rows and Columns of Data into one cell
    By markinmissouri in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2009, 06:27 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