+ Reply to Thread
Results 1 to 4 of 4

Selecting specified sheets

  1. #1
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    162

    Selecting specified sheets

    Hello!

    I am using a VBA code to compile data from multiple sheets (haven't written it myself as my knowledge in VBA is equal to a dung beetle). Currently it colllects data from all sheets and creates a new "combined" sheet.
    What would I need to write/replace in order to:

    1. Only select certain sheets to collect data from, e.g. sheets 2 - 14
    2. Not create a new sheet everytime (set as "Combined" in the code), but rather clear and update an exisitng pre-set sheet (it could be called "Combined")
    3. Automatically set the column widths

    Appreciate any help I can get!

    Here is the macro:

    Please Login or Register  to view this content.

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

    Re: Selecting specified sheets

    Just a little change:

    Please Login or Register  to view this content.
    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

  3. #3
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    162

    Re: Selecting specified sheets

    Hi and thanks for your help!

    This is closer to what I'm looking but if I run the macro a second time it doesn't just update the "Combined" sheet, it creates a new one that looks a bit weird. I want to be able to update the Combined sheet when changes are made to sheet 2-14.
    Also, I will have a sheet already (blank the first time) that will be named "Combined" so the macro does not need to create a new sheet. Is that possible?

    Thanks again for your kind help!

  4. #4
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    162

    Re: Selecting specified sheets

    Hi again,

    How unlikely it might seem, I actually managed to solve it myself Added some code to also create a table. Here is what the end result looks like.

    Please Login or Register  to view this content.
    Thanks for your help anyway! I'll set this as solved.

+ 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. Selecting sheets
    By jw01 in forum Excel General
    Replies: 4
    Last Post: 12-29-2010, 01:47 PM
  2. Selecting all sheets from A to Z
    By Thanatos in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2008, 03:18 AM
  3. Selecting only certain sheets
    By SOS in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-22-2008, 09:14 AM
  4. selecting the last 5 sheets
    By aishaz_88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2007, 05:33 AM
  5. Name sheets in VB and Selecting them.
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2005, 10:05 AM
  6. Selecting sheets - II
    By Dr.Schwartz in forum Excel General
    Replies: 4
    Last Post: 07-25-2005, 10:05 AM
  7. Selecting sheets
    By Dr.Schwartz in forum Excel General
    Replies: 4
    Last Post: 07-14-2005, 09:05 AM
  8. Selecting Sheets
    By skobrien in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2005, 05:50 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