+ Reply to Thread
Results 1 to 4 of 4

Indented Level Sort

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    Falls Church, VA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Indented Level Sort

    I'd like to populate cells based on a WBS value. For example, if a cell contains 1.1.1.1, I'd like to have it populate a cell in the column titled "Level 4"

    Is there a way to return the value of a cell based on the number of periods it contains?

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

    Re: Indented Level Sort

    I'd go the other way (calculate WBS from level), but to answer your question,

    =len(a1) - len(substitute(a1, ".", "")) + 1
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-08-2011
    Location
    Falls Church, VA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Indented Level Sort

    I agree that I would like to go the other way, but that's not how I am given data unfortunately.

    I've attached a sample spreadsheet - I did not capture my problem correctly the first time I believe.

    I would like to have the part number listed in Column B returned in the appropriate level column (C through G) dependent on the Part Level Identifier (PLI).

    As an example, I would like to have part number 5 (B6) be populated in cell G6 with a formula. My true data set is something like 500 parts long, so doing this by hand would be quite tedious.

    For some reason I cannot upload attachments, so the image attached may helpCapture.PNG

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

    Re: Indented Level Sort

    a
    b
    c
    d
    e
    f
    g
    h
    1
    wbs
    p/n
    1
    2
    3
    4
    5
    6
    2
    1 a
    a
    c2: =if(len($a2) - len(substitute($a2, ".", "")) + 1 = c$1, $b2, "")
    3
    1.1 b
    b
    4
    1.1.1 c
    c
    5
    1.1.2 d
    d
    6
    1.2 e
    e
    7
    1.3 f
    f
    8
    1.3.1 g
    g

+ 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. Extract sub-assy's of a Multi-level indented BOM
    By A-R-K in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2016, 08:25 AM
  2. [SOLVED] Multi level sort
    By Mr Ferret in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-15-2016, 11:43 AM
  3. Pivot sort by +add level
    By SwissExcel in forum Excel General
    Replies: 0
    Last Post: 01-19-2016, 04:48 PM
  4. Posisible to Disable Save As at Program level (not workbook level)??
    By brian6464 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2014, 02:49 PM
  5. [SOLVED] multi level sort in powerpivot
    By nsr1989 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-21-2013, 07:53 PM
  6. Bill of Materials conversion from multi level to single level
    By susmitpatel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-11-2013, 12:53 AM
  7. Can't get VBA code to do task at worksheet level not workbook level
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2011, 10:22 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