+ Reply to Thread
Results 1 to 6 of 6

Sheet names in array

  1. #1
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Sheet names in array

    Hi All

    i have 5 sheets in a workbook (Sheet1, sheet2,sheet3,sheet4, sheet5). i want to count column c in all the five sheets and store the values in sheet 6. So any suggestion to proceed further how to achieve this and if these sheets are in a different workbook can we declare array in the current workbook and get values . i Tried the following code (actually i did not know how to input the logic here)

    Please Login or Register  to view this content.
    Any suggestions please
    Last edited by grkchakri; 01-16-2019 at 05:23 PM.
    Never confuse a single defeat to the final defeat.

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Sheet names in array

    The best way I believe is to iterate through the worksheets using the office object model, e.g.

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Sheet names in array

    A more detailed example..

    Please Login or Register  to view this content.
    Last edited by 1aaaaaaaaaaaaaaa; 01-16-2019 at 05:48 PM.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Sheet names in array

    Count what in Column C.

    =COUNTA(Sheet1:Sheet5!C:C) will returnt he number of filled cells in column C of all sheets between Sheet1 and Sheet5
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,523

    Re: Sheet names in array

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Sheet names in array

    Thank you joli,mikerickson, poizhan for your help.

+ 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] Help with: Range Array SelectCase Loop delete: Array All Sheet.Names
    By dlow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-08-2015, 07:11 PM
  2. [SOLVED] Create an Array which has Sheet Names excluding a Few Sheet Names to be used in a MACRO
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-29-2013, 03:24 PM
  3. Using Array to refer Sheet Names
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 08:15 PM
  4. Using Array for Sheet Names
    By vidyuthrajesh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-22-2013, 07:59 PM
  5. Create array of file names/sheet names
    By BVHis in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-06-2008, 11:30 AM
  6. [SOLVED] Array of all selected sheet names?
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-05-2005, 04:05 AM
  7. [SOLVED] Load an array with Sheet names
    By S G Booth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-02-2005, 05:06 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