+ Reply to Thread
Results 1 to 3 of 3

Need a MACRO to automate Parent SKU creation for groups of children SKUs

Hybrid View

  1. #1
    Registered User
    Join Date
    06-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Need a MACRO to automate Parent SKU creation for groups of children SKUs

    Hello!

    I need to automate a process but I do not know how to write macro script. I have included a color coded template file for easy reference. The Top three rows are header columns. Coloumn A (starting at row 4) would normally contain a long list of SKUs. These SKUs are for designs and each design has a unique set of letters used to describe it, with a four letter minimum. However each design also has color and size variations with the appropriate information tagged onto the end of the SKU. For example:

    DESIGN 1:
    ABCD_BLUE_S
    ABCD_BLUE_M
    ABCD_BLUE_L
    ABCD_BLUE_XL
    ABCD_BLUE_2XL
    ABCD_BLUE_3XL
    ABCD_GREEN_S
    ABCD_GREEN_M
    ABCD_GREEN_L
    Etc…..

    But they can also have more than 4 Letter identifiers…..

    DESIGN 2:

    A_ABCC_ABCD_BLUE_S
    A_ABCC_ABCD_BLUE_M
    Etc….

    I need to know if there is a script that can search Column A (starting at row 4) and when it finds a group of SKUs that share the same beginning BUT CAN HAVE DIFFERENT COLOR AND SIZE INDICATORS tagged onto the end, it inserts a row above the first SKU and then copies only the information from that row INTO the columns marked in RED in the reference file. In addition, the information in the SKU column would be changed so that everything, Starting from the right, would be deleted up to and including the first underscore. (to get rid of the size indicator)

    Basically, I have a long list of children SKUs and I need to make Parent SKUs for them. If I were to do this manually I would scan the list and…..as per the example above….insert a Parent SKU of ABCD_BLUE for design 1 and a Parent SKU of A_ABCC_ABCD_BLUE for Design 2. (**Please note: ABCD_BLUE would still be the Parent SKU for ABCD_GREEN and….they don’t all have 6 sizes…sometimes less.**) I would then copy the appropriate information into the parent SKU cells that I needed.

    I have absolutely no idea how to write a macro for this and I realize that it is quite confusing to explain, but if anyone can help me I would be so very very grateful. If you have ANY suggestions please let me know. Thank you for your help in advance!

    Color Coded Template Reference.xlsx

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need a MACRO to automate Parent SKU creation for groups of children SKUs

    Hi,

    Can I suggest that you add some real data to your workbook and in a separate sheet manually add the results that you expect to get. It's always easier to offer advice if we can SEE what you want rather than have to interpret a narrative which often leads to misunderstandings of intent.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need a MACRO to automate Parent SKU creation for groups of children SKUs

    Hi Richard,

    Thank you for the suggestion! I cannot put real data as it is confidential but I can put example data in its place. You are very right though as even in explaining it I left a few parts out. In Row BR of the attachment file I forgot to say that the value "child" changes to "parent" for the new line inserted. Also, in addition to the SKU being cut short to remove everything up to and including the first underscore from the right, the value in column B (Title column) has to be shortened as well. Everything up to and including the second "space" needs to be removed for the new parent row inserted.

    I have added a new attachment. Sorry for the any confusion in my initial long description.

    Excel Forum Template Reference.xlsx

+ 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. Change "Parent" cell based on results of multiple "Children" cells
    By ccowman in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-14-2012, 02:33 AM
  2. Macro to automate complex variable creation
    By MattRob in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 10:43 AM
  3. Help needed : Macro to create Parent Child Groups
    By alfykunable in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2012, 05:14 PM
  4. Automate creation of monthly invoices
    By curious1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2006, 02:31 AM
  5. Macro to Automate Creation of a chart
    By pgxysyd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2006, 05:52 AM
  6. [SOLVED] automate creation of sheets in excel
    By Daniel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. HOW DO I AUTOMATE CREATION OF JOB SHEETS?
    By bobby smith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2005, 08:05 PM
  8. [SOLVED] XML / parent with multiple children and with multiple children
    By Richard in forum Excel General
    Replies: 0
    Last Post: 01-05-2005, 08:06 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