+ Reply to Thread
Results 1 to 5 of 5

VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

  1. #1
    Registered User
    Join Date
    05-22-2021
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    58

    VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

    I receive an excel file each week which I have to create a sheet for each Team along with the data, and name the tab according to the Team.

    So for instance, my steps each week are as follows:
    1) From the 'All Data' sheet, filter column A for 'Carter Team',
    2) Copy the visible rows including the header,
    3) Paste this data to a new sheet within the workbook (paste at top, starting in A1),
    4) Rename the sheet to 'Carter Team'.
    5) Go back to the 'All Data' sheet and repeat until all teams have an separate tab.

    I do these steps for each team in column A which varies from 7 to 11 teams per week. I would like code for doing these steps but unsure of the code since the number of teams vary and don't want a tab for a team if there is no data for that week.

    Information about the 'All Data' sheet:
    - Row 3 is the Header (column A thru column AP)
    - Data starts in row 4
    - Teams are in column A (number of teams vary)
    - Last row of data varies
    Note: There may be instances where a row does not have a team assigned in column A so team is blank (rare but happens). There is data in every row in column K.

    Your knowledge and help is appreciated!
    Last edited by ellenlewis; 02-05-2024 at 11:16 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,953

    Re: VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

    Here is code that I use to do that task - this is based on splitting by column A, with headers in the first row of the current region based on A3 (so, at least, row 2 should be fully blank or emptied before running the code)


    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,248

    Re: VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

    No sample file so untested...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    05-22-2021
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    58

    Re: VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

    Awesome! Codes works perfectly!

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,248

    Re: VBA Needed to Create New Sheet With Data in Workbook for Each Team in Column A

    Without sample file...okie dokie...Glad to have contributed...Tx for rep +

+ 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: 07-15-2022, 06:32 PM
  2. [SOLVED] Macro needed for AutoScroll Down - Block up Block (TV Display team by team) - Help Plz
    By NametobeRenamed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-01-2019, 12:03 AM
  3. [SOLVED] VBA Help needed to create sheet based on master sheet column cell values
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2016, 04:58 PM
  4. [SOLVED] VBA Help needed to create separate sheets for each team by year
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-05-2014, 12:42 PM
  5. Replies: 1
    Last Post: 12-03-2013, 04:19 AM
  6. guys i am trying to create a team selection sheet that has to do 3 teams
    By Bren1987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2012, 12:34 PM

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