+ Reply to Thread
Results 1 to 4 of 4

Merging worksheets of same name into single worksheet

  1. #1
    Forum Contributor
    Join Date
    11-05-2014
    Location
    Charlotte
    MS-Off Ver
    2013
    Posts
    181

    Merging worksheets of same name into single worksheet

    Hi All,

    I'm having some issues with how manual a process this is for me. Hoping for some guidence here in the forum!

    I have a huge workbook with 7 tabs. Each tab has customer information on it.

    Each month I have to filter for each customer across all 7 tabs and paste that customer's information into a new workbook. The end result is a new workbook with 7 tabs for each customer. Is there any way I can employ VBA to make this process quicker/less manual?

    Any direction is very much appreciated! Thank you!

  2. #2
    Forum Contributor
    Join Date
    11-05-2014
    Location
    Charlotte
    MS-Off Ver
    2013
    Posts
    181

    Re: Merging worksheets of same name into single worksheet

    I should add my title is wrong. I'm not sure how to edit it. It should say " Merging worksheets of same name into single workbook"

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Merging worksheets of same name into single worksheet

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Contributor
    Join Date
    11-05-2014
    Location
    Charlotte
    MS-Off Ver
    2013
    Posts
    181

    Re: Merging worksheets of same name into single worksheet

    Hello again, Xladept! So glad that you in particular responded to my post!

    I've attached my master file. I want to break it into new files, with each file having 3 tabs. New file 1 should have tabs 1, 1(1), and 1(2). The new File 2 should have tabs 2, 2(1), and 2(2), and so on.

    I tried to peice together what little I know about code/could find on the interweb. I am able to successfuly copy the sheets I need and rename the tabs appropriately. The problem I have with the code below is that it's only for the first file, and I'm in need of something that will account for the fact that the number of files that I need to create may change. One month I may have tabs that go to 10, 10(1), 10(2) and one month I may have tabs that go to 25, 25(1), 25(2). Also, the code below doesn't automatically save the workbook. I've attached the before and after.


    Sub test()
    Sheets(Array("1", "1 (1)", “1(2)”).Select
    Sheets(Array("1", "1 (1)", “1(2)”).Copy
    For x = 1 To Sheets.Count
    If Worksheets(x).Range("A1").Value <> "" Then
    Sheets(x).Name = Worksheets(x).Range("A1").Value
    End If
    Next
    End Sub
    Attached Files Attached Files

+ 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] Merging Data from multiple excel files into 1 single worksheet
    By Nerpilis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2014, 12:13 PM
  2. Merging or Appending Multiple Worksheets to one Worksheet
    By kopiko in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 05-09-2013, 11:05 AM
  3. Merging particular worksheet from Multiple Files in a folder into a single workbook
    By excelhelp18 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2012, 01:37 AM
  4. Replies: 1
    Last Post: 02-25-2011, 10:25 PM
  5. Merging Worksheets on 2 Columns PER Worksheet
    By Simone in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-03-2008, 11:05 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