+ Reply to Thread
Results 1 to 5 of 5

targeting variably named sheets

  1. #1
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    targeting variably named sheets

    I need to compile rows of data from various sheets where the building number is replaced in each tab. example: For bldg 1 the sheet will be "1001-0000-information" and on building 2 it will be named "1002-0000-information". I have a loop that will loop through each of the files but I don't know how to point it at the correct sheet.

    I have this written so far but I can't figure out how to name a **** that is partially variable and will change per sheet.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: targeting variably named sheets

    Where does the code get the building numbers?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: targeting variably named sheets

    The tab is named by the building, which is out of my control.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: targeting variably named sheets

    I get that. How is the code supposed to know whether it's building 42, or 17, or ...?

    Or is there only one worksheet with a name like that in the workbook?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: targeting variably named sheets

    FWIW:

    Please Login or Register  to view this content.

+ 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. Mastersheet, auto input named rows onto other named sheets
    By Chalkie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-01-2014, 12:33 PM
  2. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  3. Open Variably-named File
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2010, 12:28 PM
  4. Switching between workbooks in VBA, where one wbk is variably named
    By ajava in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-04-2010, 03:50 AM
  5. [SOLVED] targeting another prg by using DDE in the code
    By CC_rider in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2006, 02:45 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