+ Reply to Thread
Results 1 to 3 of 3

Create New Sheets based on Criteria and Multiple Templates

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    Boston,Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Create New Sheets based on Criteria and Multiple Templates

    Good Morning,

    I need to create multiple sheets in a workbook based on two lists.

    As you can see I 6 sheets (EA,SY,SF,CY,LF,TON) those are my templates. I need to first have the code look at the data in column D3 to however long the range is and if it matches the template sheet name then create a new sheet based on that template.

    I then need to have the new sheets created renamed to the data located on column A of that same row.

    for example using A3 the code would create a new sheet named 145 using the template for EA. I'm not sure how possible this is.

    Thanks


    Excel.jpg

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Create New Sheets based on Criteria and Multiple Templates

    You could use this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    04-28-2014
    Location
    Boston,Ma
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Create New Sheets based on Criteria and Multiple Templates

    That seems to be working, it's picking the right template and renaming it correctly but a few issues.

    1) I'm getting a run-time error "9" subscript out of range after the second sheet is created.
    2) Also I might have not been clear in my explanation, I don't want it copying the row A3 onto the new sheets.

    Attachment 425050

    If anything I need to copy the data on columns A-C to its corresponding new sheet and put them in the correct spot on the new sheet.
    I've included the photo above to show you and all my templates headers are all the same format

    So item 145 for example would create a new sheet with the EA template then copy the Item (Cell A3 'Estimates') to cell B5 (Item 145 Sheet), the Description (Cell B3 'Estimates') to cell A1 (Item 145 Sheet) and the Original contract qty (Cell C3 'Estimates') to cell B6 (Item 145 Sheet)

+ 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. VBA to Create PDF for excel sheets based on criteria
    By rwrig in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2015, 07:11 PM
  2. Replies: 1
    Last Post: 06-03-2015, 06:27 PM
  3. [SOLVED] Create new sheets from master sheet based on multiple column criteria
    By hamidxa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2015, 02:44 PM
  4. Replies: 2
    Last Post: 09-19-2013, 04:22 AM
  5. Replies: 13
    Last Post: 11-29-2011, 11:33 AM
  6. Replies: 0
    Last Post: 07-27-2011, 01:00 AM
  7. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 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