+ Reply to Thread
Results 1 to 6 of 6

Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    15

    Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    This is my second thread and I hope someone would be willing to assist a novice VBA programmer (although I'm not sure I even qualify as a novice). Here's the situation... I have a worksheet named "Master Matrix". I want to copy items from the worksheet (called "Master Matrix") based on certain criteria. All items are broken into zones (i.e. A Zone, B Zone, etc.) and I need a Macro that can (1) Look to see if a sheet has been created for the criteria in question (in this case look for a worksheet named "A Zone"), (2) if no sheet exists, create the worksheet and name it accordingly (in this case "A Zone"). (3) Next it has to identify which zone each item is in based on the criteria in Column AG (as you may have guessed, Column AG is named "Zones"), and copy items that meet the criteria into the worksheet named same (e.g. "A Zone" items copied to worksheet "A Zone"). If at all possible, please insert comments into the Macro so I may know which portion does what function (I may have to change this in the future). Some more specifics... the workbook is about 10,000 rows, and has Columns "A" through "AI" (... just in case that will affect your programming). It currently has Autofilter enabled. I am thankful in advance of any assistance that can be provided.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    Do you have a sample file that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-20-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    I'm unable to attach a file as all items I would be working with are legally covered under proprietary information. Can you still help by chance?

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    You do not need to upload the exact file. Just a dummy file to understand the data layout will do.

  5. #5
    Registered User
    Join Date
    06-20-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    Not sure how to attach a file...

  6. #6
    Registered User
    Join Date
    06-20-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Macro to Look for Sheet, create if none, sort items from master & copy to new sheet.

    Hope this worked...

    Small change, can the Macro copy Columns A, D, & AI to the cover page under the "JOBS" section, and create a worksheet named "JOBS"? All other columns not necessary. Thanks


    Example.xlsx
    Last edited by ali.whitaker; 07-25-2012 at 01:02 PM. Reason: Provide better information to assist...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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