+ Reply to Thread
Results 1 to 8 of 8

Generate tabs for each material in overview

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Generate tabs for each material in overview

    So I attached a sample book and what I want to achieve is a macro that makes for every material on the fist tab, to make a seprate tab with a certain header layout.

    As you see this example has 43 lines which means it has 42 materials (next months it could be more or less).
    Now for every (unique; but they should be unique) material I want the macro to generate a tab and name the tab the name of that material.

    The heading on this new tab should be like you can see in the first material tab (A1030-020) in the sample data.

    As said every month the data will be refreshed and the macro should re-do everything for the materials that are then present in the updated data.
    So throw out the old tabs (except the first of course and another tab that is in the org file but not in this sample).

    Could somebody put my on my way with this request?
    Attached Files Attached Files

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: Generate tabs for each material in overview

    Maybe something like the attached will help?
    Attached Files Attached Files
    If things don't change they stay the same

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Question Re: Generate tabs for each material in overview


    So the purpose is to create an empty sheet for each material with just the header row without nothing else ?

  4. #4
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Generate tabs for each material in overview

    And why not copy the information from the next two columns: 'PF' and 'Twelve Month Demand E&O'?
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  5. #5
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Generate tabs for each material in overview

    Thanks this works perfect @CheeseSandwich!

    And yes @beyond Excel before going to the next material tab I have to build in still some formulas.
    But the data for that is in a much bigger tab that I left out here.

    Actually the old data for previous months gets re-created every time because for that month we are only interested materials that are on the first sheet.
    Next month there could be a material not in that is on current months sheet and there should be no tab made for that one then.

    Every month the total book gets saved with idicator of which month/year.

    Not sure if it can be done better. User just does want only materials in that are on first sheet.
    And if you also need history per material you can do it only to recreate all history every time instead of just adding the new line for a material.

    Idea's would be welcome.

  6. #6
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Generate tabs for each material in overview

    Question @CheeseSandwich you had this :
    Please Login or Register  to view this content.
    I put in this for also filling the Material in column A in the template:
    Please Login or Register  to view this content.
    How could I also make it fill column D automatically?
    In the data material is column A and PF is always in column F and needs to be pasted in template in column D

    Tried several thing on the unq variable you made but cannot make something similar that always gives me the correct PF for that material.

  7. #7
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: Generate tabs for each material in overview

    Maybe the attached?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-26-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2016 Office 365 ProPlus
    Posts
    822

    Re: Generate tabs for each material in overview

    Yes this would do it! Thanks CheeseSandwich

    With this example I can improve my code.

+ 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. VLook-up or VBA macro to generate material code
    By chetan_jawale in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2018, 06:19 AM
  2. [SOLVED] Generate individual schedule from overview
    By Kryddost in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-07-2017, 08:14 AM
  3. Auto populate items on subsequent tabs based off information on overview tab
    By delmato in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2017, 09:00 AM
  4. [SOLVED] Overview of different weekly sales tabs.
    By ExcelnoviceUK in forum Excel General
    Replies: 12
    Last Post: 02-07-2017, 07:19 AM
  5. [SOLVED] Macro to copy data from multiple sheets to overview and align results on overview sheet
    By McBree in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2015, 04:01 PM
  6. Resoruce overview - Create new sheet and add to sumif function in exsisting overview
    By Martinbif in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2013, 09:58 AM
  7. Tab for overview of all data on other tabs
    By fiddles in forum Excel General
    Replies: 1
    Last Post: 07-13-2010, 04:44 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