+ Reply to Thread
Results 1 to 6 of 6

Looking for a macro/VBA that can data group rang of lines based on cells contents

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Looking for a macro/VBA that can data group rang of lines based on cells contents

    Hi Guys,

    We are managing Bill-of-Materials (BOM) list in hierarchal order.
    I'm looking for a macro/VBA that can data group rang of lines based on cells contents,
    final result can be nesting of groups within group, I attached an example file.

    Thanks,
    Zadok
    Last edited by Zadok; 09-19-2012 at 02:04 PM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Looking for a macro/VBA that can data group rang of lines based on cells contents

    hi Zadok, basing on the posted example it could be done this way

  3. #3
    Registered User
    Join Date
    09-11-2012
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Looking for a macro/VBA that can data group rang of lines based on cells contents

    Hi watersev,

    Thank you for helping, the macro you suggest indeed return with the results as i asked for.

    Problem is that in actual BOMs, the nesting level is up to 5 (sorry for not mention this in 1st example file),
    I tried to use macro w/ 5 levels BOM, but the macro not group 5 hierarchical levels (as attached example file).
    Please see the "results" worksheet in the attached file, this represent the actual data grouping required for 5 levels.
    If possible to re-adjust the macro it will realy great!

    Best Regards,
    Zadok

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Looking for a macro/VBA that can data group rang of lines based on cells contents

    it's a bit different result from yours but I hope it will suit you needs

  5. #5
    Registered User
    Join Date
    09-11-2012
    Location
    Tel Aviv
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Looking for a macro/VBA that can data group rang of lines based on cells contents

    Hi Watersave,

    Thank you my friend, it's works like a magic
    Hope i'll know to write such code someday.

    Thanks,
    Zadok

  6. #6
    Registered User
    Join Date
    10-01-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Looking for a macro/VBA that can data group rang of lines based on cells contents

    Sample data.xlsx

    I have a similar problem. I need to group data by "SCN" number. Each SCN number is an order that may have multiple FSC (finish stock numbers) associated with it. Need to build a macro so that i can group the FSC's with one SCN. Also, need to subtotal each of the column headers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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