+ Reply to Thread
Results 1 to 5 of 5

Transforming 1level coded product tree to few level product tree

  1. #1
    Registered User
    Join Date
    12-08-2010
    Location
    Lithuania
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    10

    Transforming 1level coded product tree to few level product tree

    Hi there,

    the solution I was trying was multiple vlookup function. But it seems quite complicated and still it requires a lot of effort and time. Oracle DB gives me an Excel file with all the products in one column and its parts in second column. It could seem that there is only one level bills of materials (BOMs), but actually our products could have many levels with many parts inside. So, Oracle DB has an unique ability to code (hide) information from me by giving just one level product tree. And what I need is to transform the data to normal BOM. I do not know if I expressed clearly, so I attach the Excel file from which you can have better view on my problem. Oracle product tree transformation.xlsx


    I need a way to transform data to the table format I provide because later I could use pivot table.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transforming 1level coded product tree to few level product tree

    1) eliminate the second table on the right.

    2) Using Excel 2007, in C2 put this starting formula: =IFERROR(VLOOKUP(B2,$A:$B, 2, 0), "")

    3) Now copy that down the whole data set, then to the right as far as needed until no more values appear on any rows.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Transforming 1level coded product tree to few level product tree

    Hi,

    Attached is a VBA solution which should work in Excel 2003 and Excel 2007:
    Please Login or Register  to view this content.
    If you choose to use JB's solution the following macro in an ordinary code module should allow JB's formula to work in Excel 2003. Coincidentally, the following code was created by JB several years ago. Thanks again JB.
    Please Login or Register  to view this content.
    Lewis
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-08-2010
    Location
    Lithuania
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    10

    Re: Transforming 1level coded product tree to few level product tree

    I've just now spotted solution. When I opened it I've just started to laugh out of joy. Incredible! LJMetzger is genius! THAN YOU VERY MUCH!

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Transforming 1level coded product tree to few level product tree

    How about just a formula?

    Row\Col
    L
    M
    N
    O
    P
    Q
    1
    Products
    Parts
    Level2
    Level3
    2
    A 111 1818 444 N2 and across and down: =IFERROR(VLOOKUP(M2, $L$2:$M$13, 2, 0), "")
    3
    A 444
    4
    A 555
    5
    A 666
    6
    B 222
    7
    B 111 1818 444
    8
    C 333 1818 444
    9
    C 222
    10
    C 333 1818 444
    11
    111 1818 444
    12
    333 1818 444
    13
    1818 444


    I converted all the products and parts to text first.

    Copy the formula down and right until it returns a column of blanks, as shown in col P.
    Last edited by shg; 04-07-2015 at 10:43 AM.
    Entia non sunt multiplicanda sine necessitate

+ 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: 3
    Last Post: 12-28-2012, 08:27 AM
  2. [SOLVED] Find Product Details in Another Sheet based on Product ID and Copy some Fields From there
    By kevalkothari in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2012, 10:43 AM
  3. Tree / Level Structure "From & To" Input
    By Mike_S in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2010, 07:14 PM
  4. [SOLVED] Pivot Table - report product that have sales above defined level
    By richard in forum Excel General
    Replies: 0
    Last Post: 12-09-2005, 10:10 AM
  5. [SOLVED] how to raise the Macro security level in a product I can't execute
    By vfstevenson in forum Excel General
    Replies: 0
    Last Post: 09-15-2005, 05:05 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