+ Reply to Thread
Results 1 to 8 of 8

Combine MANY tabs (with single column) into SINGLE tab.

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    YIKES! Reduce MANY tabs (with single column) into SINGLE tab.

    Wonder if someone knows a way to do this, I'm using Excel 2007 (running on Windows 7):

    - I have a single workbook with something like 173 or so tabs.
    - Each tab has only Column A populated.
    - On each tab, Column A is populated with anywhere from 1 to 30 (max) email addresses (it varies from tab to tab).
    - There are no spaces between email adresses, that is, on a tab where there are 2 of them, they are in cells A1 and A2, etc.
    - There are no headers of any kind.
    - The result I need is a new tab with a single column that contains ALL of the email adresses (don't care if the individual tabs are erased or not).

    I don't want to use consolidate since I don't want to have to select each tab and select the data...it'll take forever and I have other workbooks like this.

    Might anyone know of a way to do this automatically?

    I'll admit, I don't know ANYthing about vba, so if that's the solution, you'll have to be detailed and explicit (sorry about my ignorance).

    Very appreciative in advance for any help,
    Nick

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: YIKES! Reduce MANY tabs (with single column) into SINGLE tab.

    My VB is a little rusty, but you could use concatenation or indirect to systematically write a formula to pull it.

    Do the sheets follow any sort of naming convention, or are they just Sheet1, Sheet2, etc?

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: YIKES! Reduce MANY tabs (with single column) into SINGLE tab.

    My VBA is garbage compared to most but I would find some relevant code online and make it fit the situation.

    The very last piece of code seems relevant: http://www.rondebruin.nl/win/s3/win002.htm
    Copy a range/column after the last column with data
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Combine MANY tabs (with single column) into SINGLE tab.

    Ok Nick

    This is quite interesting so I will write you a program to do this.

    BRB.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Combine MANY tabs (with single column) into SINGLE tab.

    I'm Back.

    Your Code is below.

    Make sure you are in the workbook that you want to modify.

    Make a note of the Macro name at the next stage
    Click on "Developer" and then "Record Macro" Make sure you select in this workbook.

    Click on Cell A1.

    Click on "Developer" and then "Stop Recording"

    Click on "Developer", Select your macro and then "Edit"

    Now paste the following code over your macro. and close visual basic.


    Ok now

    Click on "Developer" and then "Run Macro" using my macro name "ModifyMacro"


    ********************************************************************************************


    Please Login or Register  to view this content.

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

    Re: Combine MANY tabs (with single column) into SINGLE tab.

    Nick,

    As per forum rule 5, you are not supposed to create duplicate threads in the forum. I have merged both your threads into one.
    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]

  7. #7
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: YIKES! Reduce MANY tabs (with single column) into SINGLE tab.

    if "Summary" worksheet doesn't already exist it is created. col A of all other sheets copied to col A in "Summary"
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    09-16-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: YIKES! Reduce MANY tabs (with single column) into SINGLE tab.

    It gave me error codes and stopped. But someone gave me the following, and it worked nicely:

    Sub wigi()

    With ActiveWorkbook

    Set ws = .Sheets.Add(before:=.Sheets(1))

    For i = 2 To .Sheets.Count
    With .Sheets(i).UsedRange
    ws.Cells(ws.Rows.Count, 1).End(xlUp)(2).Resize(.Rows.Count).Value = .Value
    End With
    Next
    ws.Cells(1).Delete xlShiftUp

    End With


    End Sub

+ 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: 7
    Last Post: 10-23-2012, 02:29 PM
  2. How to combine data in a single column from three columns
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-18-2011, 01:37 AM
  3. Combine several columns of different length into one single column
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2006, 03:25 AM
  4. Replies: 9
    Last Post: 08-15-2005, 07:05 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