+ Reply to Thread
Results 1 to 12 of 12

BOM explosions (different formats)

  1. #1
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    BOM explosions (different formats)

    Dear Forum,

    At our company, we have to upload very complicated Bill of Materials (BOM) into our new ERP system on a weekly basis. These BOM's are based on Indents (BOM Explosions). These are always multi-layered (endlessly), meaning, there is a BOM in a BOM. In the example, the product P1-A0000 is built of three components, and these three components are built out of other components.

    From my previous thread from a couple of months ago, I got great help from WideBoyDixon regarding this issue. https://www.excelforum.com/excel-for...ml#post5592700

    However, I assumed that most BOM's that we received are based on BOM Explosions which are Level 2 Indents, but I came to the conclusion that more often than not, this is not the case and two other ways are distributed too. (1) is that spaces are used instead of indents and (2) is that level 1 indents are used instead of level 2.

    I need your help to update the macro written in the previous thread (I will write it in the comment below). I don't know rather it is possible to use one macro that identifies what is used, changes the spaces to indents, and indents 1 to 2, and then make the BOM outcome correctly after. I would need your advice, maybe three buttons are better? (1 for spaces to indents, 1 for indents 1 to indents 2, and 1 for indents 2 to BOM outcome)

    It is quite the challenge (for me at least), I am curious if any of you can find a solution!

    Thank you so so much in-advance!
    Last edited by TBRM Group; 01-25-2022 at 03:48 AM.

  2. #2
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    The code that fixed the issue shaped the problem perfectly, but only with level 2 indents

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    Below the attachment.
    This is just with Level 2 Indentures, where the code above works on.
    Attached Files Attached Files
    Last edited by TBRM Group; 01-24-2022 at 08:50 AM.

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: BOM explosions (different formats)

    This *should* auto-detect the type of indentation being used on the "INSERT" sheet and deal with it accordingly.

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  5. #5
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    Hi WideBoyDixon,
    Thank you! It seems to work well with singular indents, I did a single test just now. I do have the second issue surrounding spaces. Any idea how I could fix that issue? So right now BOM's with 1 or 2 level indents would be converted into the correct BOM layout, but, if I get one that uses spaces instead of indents, that would not yet work via this macro

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: BOM explosions (different formats)

    The macro is intended to deal with spaces also.

    Please Login or Register  to view this content.
    WBD

  7. #7
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    You are legend! It does indeed work, I know why it did not work yesterday. Thank you!

  8. #8
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    Oh apologies, it appeared to work, but it is not the correct BOM layout. So I found out that the one I used uses quite a few spaces which indeed were converted to Indents perfectly. However, it was converted to 4-level indents, I am assuming this is because it was 4 spaces per level. Which I suppose is good, it looked good, but the macro does not work correctly above 2-level indents, I just manually changed them all to 3, no effect, but when I got to 2, the outlook did come out good on page "OUTCOME".

  9. #9
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: BOM explosions (different formats)

    Please Login or Register  to view this content.
    WBD

  10. #10
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    Works, thank you!! Unfortunately cannot give you "Reputation" again haha

  11. #11
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    I don't know if it is in your realm of knowledge, but could you have a look at my other thread?
    https://www.excelforum.com/excel-pro...ml#post5624646

  12. #12
    Registered User
    Join Date
    11-10-2021
    Location
    Netherlands
    MS-Off Ver
    Office365
    Posts
    34

    Re: BOM explosions (different formats)

    Hi WideBoyDixon!

    Your code still works splendidly but I have one small additional request to prevent it from lagging too much. Currently the code checks the entire column A from "BOM INSERT". However it might happen that you run the FORMAT button and it takes FOREVER to load as it is checking every cell down. Is there a way to stop it from running further down, if there is an empty row, it should stop there? This sometimes can be 10, other times 100, but never 1048529 rows haha. If you need the full file, let me know.

    Please Login or Register  to view this content.

+ 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: 1
    Last Post: 10-21-2020, 07:49 AM
  2. Replies: 4
    Last Post: 10-01-2014, 03:18 PM
  3. [SOLVED] Too many formats -- how to count formats in a workbook
    By macrorookie in forum Excel General
    Replies: 2
    Last Post: 07-09-2014, 03:41 PM
  4. [SOLVED] PasteSpecial with number formats but without conditional formats or borders
    By bodhi808 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2013, 09:58 AM
  5. Problem copying Page formats and print formats to another workbook
    By Chrisgeni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 08:05 AM
  6. [SOLVED] Copying formats - column widths, formats, outlining to worksheets
    By DavidBr318 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2005, 09:05 AM
  7. Formats: Too many different cell formats error message
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2005, 10:06 PM

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