+ Reply to Thread
Results 1 to 3 of 3

Converting a matrix into 3 normalised tables

  1. #1
    Registered User
    Join Date
    02-27-2019
    Location
    Blackburn
    MS-Off Ver
    2010
    Posts
    9

    Converting a matrix into 3 normalised tables

    Hello all,

    I am trying to convert a matrix into three separate normalised table. I will have a lot of these and they will be bigger than the example so I'm hoping to find an automated method eg a module. Here is an example:

    excel.jpg



    Any help would be great!

    Thank you.

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

    Re: Converting a matrix into 3 normalised tables

    Hello AndyRob1973 and Welcome to Excel Forum.
    Here is a formula based proposal.
    For the Activities table
    For the ID: =IF(B8="","",SUM(A7,1))
    For the Activity: =IF(B2="","",B2)
    For the Visits table
    For the ID: =IF(E8="","",SUM(D7,1))
    For the Visit: =IFERROR(INDEX(C$1:F$1,ROWS(A$1:A1)),"")
    For the Junction table
    For the VisitID: =ROUNDUP(ROWS(A$1:A1)/MAX(D$8:D$12),0)
    For the AcitityID: =COUNTIFS(G$8:G8,G8)
    For the Required: =INDEX(C$2:F$5,MATCH(INDEX(B$8:B$12,MATCH(H8,A$8:A$12,0)),B$2:B$5,0),MATCH(INDEX(E$8:E$12,MATCH(G8,D$8:D$12,0)),C$1:F$1,0))
    Note that conditional formatting could be used to hide zeros in the Required column.
    For future reference, you will usually get faster responses if you include a sample Excel file rather than a screen shot. As you are new and as there was not too much data I produced an Excel file on this occasion.
    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.

  3. #3
    Registered User
    Join Date
    02-27-2019
    Location
    Blackburn
    MS-Off Ver
    2010
    Posts
    9

    Re: Converting a matrix into 3 normalised tables

    Thank you JeteMc,

    That's superb! I'll test it against my actual data.

    Thanks for the posting advice too.

    I've attached the excel example in case anyone is able to give me a macro, but this will help me a lot
    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. Converting a Data into Matrix
    By mechksbabu in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-30-2016, 02:37 AM
  2. Creating subtotals on normalised table
    By Canther in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2013, 12:55 PM
  3. Converting a column of data into a matrix
    By Bandicoot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 07:25 AM
  4. Converting a matrix into multiple row format
    By flord in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2013, 05:27 PM
  5. Converting a matrix to an array?
    By gannon_w in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2013, 07:01 PM
  6. Tree structure, with normalised output
    By mimoune in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2013, 03:54 AM
  7. Converting a matrix without Zeros
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2012, 03:19 AM

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