+ Reply to Thread
Results 1 to 3 of 3

Calculate chains of codes

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Calculate chains of codes

    Hello,

    I have a table with 2 columns: old code, new code.
    I wish to generate a chain for each new code (string with all the old codes).

    for example:
    Input:

    Old code, New code
    A,C
    B,C
    D,B
    ..

    Output:
    C: A,B,D
    B: D


    What is the best way to implement this in excel ?

    Thank you for your help

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,959

    Re: Calculate chains of codes

    Hi snoopy

    It looks like almost 40 people have looked at your thread, yet you have no responses

    Perhaps it would help if you explained a bit more what you are trying to do, and how you arrived at your expected outcome?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: Calculate chains of codes

    Hello,

    I attached an example file with 2 sheets.
    code sheet - 2 columns - new code, old code
    stck sheet - stock for each code per month

    My goal is to update stock according to codes chians.
    I go over the new code column and for each code I sum the stock of old parts.
    for example:
    for code 'C' I sum the stock for C,B,A,D,E
    for code 'B' I sum the stock for B,D,E
    for code 'D' I sum the stock for D,E.

    I wish to find the best way to calculate this.
    First I wish to generate code chains and the go over the stock table and calculate it.
    Another way is to implement some data structure like linked list and store codes with stock data.
    I will appriciate if you tell me how do you think I should implement this.

    Thank you for your help
    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)

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