+ Reply to Thread
Results 1 to 17 of 17

converting matrix data into a table

  1. #1
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Cool converting matrix data into a table

    I been trying to solicit a robust working solution to this problem without complete success. I revised the attached file for better understanding.

    In summary: I have a Matrixed data on sheet 1 that needs to be transfered into a table very much as shown in sheet 2.

    notes to keep in mind:
    1. the table utilizes grouping
    2. I CAN'T have any empty rows in the table.
    3. i CAN start off by manually inserting the exact number of blank rows needed for each Box in the table.
    4. the data in sheet 1 is dynamic; part numbers, qnty and the number of parts in each box can change.
    5, data in sheet two is mostly the formula generated result.
    5. i would prefer to use formulas to drag down the columns.
    6. I am not an Excel expert by any means; you will have to hand me the answer on a silver plate if you may ;otherwise i will be lost. I can however tweek the formula to work for the other columns; i think i can manage without too much trouble.

    if you can successfuly help i would very much be grateful to you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: converting matrix data into a table

    Maybe it's usefull to other members.

    Now they can see, which option you already been given.

    http://www.excelforum.com/excel-gene...html?p=2836995
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    Oeldere,
    I appreciate all your attempted help- thank you. But please give others a chance to help me- maybe they have different views and experience on the subject. I don’t want to be rude but I really did try your suggestions. I am sure your intentions and solutions are great and you certainly have been a great help to others but I would not be posting here if I have a working solution. I am not an Excel expert and could use the right help - please give others a chance to help with this one.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Hi Red fuji,

    Why can't you use Sheet1 only and use your autofilters. You could just click the dropdown and uncheck the blank. That would give you what you have on sheet2. It seems to me that sheet 2 is redundant and useless data because it is simply a repeat of sheet1.

    The topic of Pivot Tables has been suggested but your data on sheet1 won't accomplish a pivot. Your data on sheet1 is more of a Cross Tab type of structure. To create a Pivot table from it you would need to move a bunch of stuff around.

    I wrote some code a while back to convert Cross Tab to tables and run it on your sheet1. I've converted your data on Sheet3 and have done a Pivot Table on it to show you what others have been suggesting. I hope this helps you see why they like Pivot tables. See the attached with the code to convert your Cross Tab to a Table and the results of using a Pivot on Sheet3.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    I do use sheet one for reading and updating the data. Think of sheet two data as a reflection of sheet one data -just organized differently.
    Sheet one is the back-end dynamic raw data( part count and parts in the box could change). Sheet two is the front end presentable data. You update sheet one and sheet two reflects. I just need a formula to drop in sheet two cells that reads sheet one. It is not that I am looking for the best way to manipulate the data-Pivots and such-no I just need to present it in a specific 'table' format- see sample file. I know someone with the right skill knows how to do it; this board is full of a varity of talent-all good. Thanks

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Hi,

    Your sheet1 has the data arranged in a Cross Table format. Excel works best with a Table format like I've changed your data on my Sheet3 example. Your Cross Table data is not easily changed to what you desire. It would take VBA to get from what you have to what you want on sheet2. OR you could simply work with your data on sheet1 using the AutoFilter feature built into Excel.

    I know you don't like my answer and want a simple formula to make your sheet1 data view like sheet2. You want a formula on sheet2 that displays the data like you have it. Sometimes there isn't a formula to do what you want. My best guess is to change your sheet1 data structure like I've shown you on sheet3 and do a Pivot Table from that data structure. If you don't like Pivots (like you've said in previous posts) then use sheet1 and the AutoFilter.

    Another point that us "gurus" have is some of the "features" in excel don't work very well. The first is Merged Cells. These just make us work harder to do things but are there for beginners to make stuff look pretty. A second feature is Groups, like you use on your sheet2. They are very hard to work with using normal excel furnctions and are there for people who have to have "outline" type needs. Excel works best with TABLES of data, similar to your sheet1 but more exactly like my sheet3. Tables (not cross tables) give the real power to excel. When a user needs to have merged cells or outlines on their sheets it decreases the use of the data instead of enhancing it.

    Sorry we couldn't get to where you wanted to go, using your sheet1 data structure. (now if you were to change it to my sheet3 structure....)

  7. #7
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    you are right about Merged cells causing problems even for simple tasks as auto filtering. that's why i dont use them and i dont have any in this file. as for grouping; i can bypass.

    The formula would look at column G in sheet 1 to find populated cell; once it finds one it would then read adjacent cell in column A- that process would be repeated for the range of rows specified in the formula. Example: G51 has a value. therefore the formula will read A51. Once i have that basic formula i can manuly place it in sheet two and change it to read various cells in sheet one. I just need the basic formula. I am not looking for formulal that will set up the table structure- i will do that manually. I just need it to find populated cells in a specified column and report the adjacent cell.
    Last edited by Red fuji; 06-26-2012 at 01:15 PM.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    OK Red fuji,

    Find the attached where I've written some VBA. Click on the Run button and Sheet3 will be what you want. You will need to give it a title row and sort by Box numbers. There is no EASY Excel formula to do what you want. To do what you want using Excel simple formulas would need many helper formulas. This VBA should do what you want.
    Attached Files Attached Files

  9. #9
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    Marvin,
    Oh boy- I know less about Macros; but I think it will do. Every time i rerun it I lose the column headings ?? Can you add headings to the code below and I can add it back to excel.



    Please Login or Register  to view this content.
    Last edited by Red fuji; 06-26-2012 at 02:50 PM.

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Here you go.

    Please edit your above post and delete the VBA code or put it in Code Tags as per the forum rules.

    Code tags will make it look better, like this:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    dont go away- i will be applying it to my primary file tweeking the wording and column references to match up. I am not sure what questions will come up then.

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Did I say that my help is free? "Don't go away" makes it sound like I work for you. You have no idea.....

    I hope you can solve your problem now.

  13. #13
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    MarvinP,
    NO No NO
    My sincere apology. My thought is that you helped me with a good workable solution that you are familiar with and would be able to relate to the most if future questions came up. Basically-I loved what you did and it subconsciously made me friend you with relaxed talk. I thank you for using your talent and skill in helping others FREE OF CHARGE, you are providing an invaluable personal help that not even Microsoft can provide. With that said, I have a question but it is totally up to you if you like to answer it or not- I can understand. I wish I had saw your post sooner for a faster appology.

    If I shift everything in sheet one to the right by 5 columns how come i dont get any result even when i adjusted the VB accordingly? what did i do wrong with the code? here it is:

    Please Login or Register  to view this content.

  14. #14
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Hi,

    You will need to attach the new sheet1 so I can see which columns you inserted. Then I'll step through the code and see what letter or cell address is wrong.

  15. #15
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    Thanks MarvinP

    By many trials I managed to work that one out. I have additional data in sheet 1 that i want to incorporate but not having much success working into the code.

    I added a description for each of the 25 Boxes as Shown in range C1:D26. The Box #s in M27:AK27 would be duplicate of C2:C26. i.e. C2=L27 and so on. can you please help me work that into the Macro?
    Attached Files Attached Files
    Last edited by Red fuji; 06-28-2012 at 11:35 AM.

  16. #16
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,219

    Re: converting matrix data into a table

    Ok -

    See if this works for you.

    I added a VLookup to the VBA code to add your Box Description to the Sheet3. We'll make a programmer out of you in a while.
    Attached Files Attached Files

  17. #17
    Forum Contributor Red fuji's Avatar
    Join Date
    03-21-2012
    Location
    The earthquake state, USA
    MS-Off Ver
    2016 Office
    Posts
    140

    Re: converting matrix data into a table

    Thanks - Yes it works!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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