+ Reply to Thread
Results 1 to 2 of 2

trying to use sheet CodeName to list all sheet names in a workbook

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    trying to use sheet CodeName to list all sheet names in a workbook

    Basically I have a workbook with 53 sheets in it and I need to list those sheet names on a summary sheet. The problem is i need to use CodeName because the sheet order within the workbook WILL change and i need the summary sheet to stay the same, hence need to use CodeName.

    I have numbers in column A which I want to use as the codename number and the formula in column b should return the sheet name for that codename numbered sheet.

    I have a user function which does the job but this is not based on codename so whenever the order of the sheets change, so does the order of items in the summary sheet

    Please Login or Register  to view this content.
    Using that function, I have the sheet numbers 1-53 down column A, and "=SUM(INDIRECT("'"&$B4&"'!$C$449:$L$449"))" which uses the sheet name and sums a range from within each sheet.

    I am sure its easily possible just modifying the function to use SheetNumber input for the codename number, I just havent managed to work it out, instead of Sheet1.name something like Sheet1SheetNumber.name
    Last edited by neowok; 03-12-2012 at 12:41 PM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: trying to use sheet CodeName to list all sheet names in a workbook

    Please remember to use code tags when posting code to the forum.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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