+ Reply to Thread
Results 1 to 10 of 10

Split 2 Tabs with Similar Names into Separate Files

  1. #1
    Registered User
    Join Date
    04-14-2021
    Location
    houston
    MS-Off Ver
    16
    Posts
    6

    Split 2 Tabs with Similar Names into Separate Files

    Hi,

    I wanted some help in writing a code (I'm very limited in my knowledge of VBA). I have a workbook with 140 worksheets. The worksheets follow two different name formatting -

    1. 70 sheets have a worksheet name which is the name of the person, i.e. Doe, Jane
    2. The remaining 70 sheets are the name of the person appended with the word Summary i.e. Doe, Jane Summary

    I need to break the excel file into 70 separate workbooks where each workbook is a combination of 2 two tabs, i.e. Doe, Jane and Doe, Jane Summary
    I'm not sure if this is achievable and if it is how to go about it.

    Please help!
    Thank you so much!

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,266

    Re: Split 2 Tabs with Similar Names into Separate Files

    e.g.
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    04-14-2021
    Location
    houston
    MS-Off Ver
    16
    Posts
    6

    Re: Split 2 Tabs with Similar Names into Separate Files

    This works perfectly!
    Thank you so much!

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Split 2 Tabs with Similar Names into Separate Files

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    04-14-2021
    Location
    houston
    MS-Off Ver
    16
    Posts
    6

    Re: Split 2 Tabs with Similar Names into Separate Files

    One question, what if i have a couple of sheets that are "Rep Name Summar" because the rep name is too long so the entire word "Summary" is not being able to append in its entirety.

  6. #6
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,266

    Re: Split 2 Tabs with Similar Names into Separate Files

    In such situations, does the sheet name always have the maximum number of letters (31)?

    Artik

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Split 2 Tabs with Similar Names into Separate Files

    untested but perhaps something like the below if only the 2 situations can occur


    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-14-2021
    Location
    houston
    MS-Off Ver
    16
    Posts
    6
    Quote Originally Posted by Artik View Post
    In such situations, does the sheet name always have the maximum number of letters (31)?

    Artik
    Yes, the sheet name will always have 31 characters. Because it will be the name of the person plus however many letters of the word summary can be fit in. In this case both the sheet names have Summar but it can be reduced to summa or su etc..

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Split 2 Tabs with Similar Names into Separate Files

    do any names exist like

    Doe, Sally Anne
    or
    Wilson Jones, David?

  10. #10
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,266

    Re: Split 2 Tabs with Similar Names into Separate Files

    I think that this macro should give yourself advice:
    Please Login or Register  to view this content.
    One condition. The " Summary" element must contain at least two characters - space and S.

    Artik
    Last edited by Artik; 08-27-2021 at 08:56 PM.

+ 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. [SOLVED] Two files similar names - trying to return the name of of the right one
    By FARRISSF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2021, 01:52 PM
  2. Copying data to tabs with similar names
    By Jacobg38 in forum Excel General
    Replies: 1
    Last Post: 01-10-2017, 08:02 PM
  3. Copying data to tabs with similar names
    By Jacobg38 in forum Excel General
    Replies: 0
    Last Post: 01-10-2017, 04:54 PM
  4. Replies: 1
    Last Post: 08-19-2016, 03:29 PM
  5. [SOLVED] Split a list in to separate tabs
    By kiboodez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-02-2014, 11:31 AM
  6. How to insert a similar formula into separate excel files
    By mehdi483 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-19-2014, 01:31 PM
  7. Moving multiple excel tabs into separate tabs/separate files
    By RO24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-02-2014, 11:04 AM

Tags for this Thread

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