+ Reply to Thread
Results 1 to 4 of 4

Concatenate a Worksheet Name Problem

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Concatenate a Worksheet Name Problem

    I have a main worksheet where I need to reference other worksheets in a formula, which won't be available until a date in the future. These additional sheets will all follow the same naming format, i.e. a three digit code, which I know already and have on my main sheet followed by the year, so for example the worksheet I need to reference could be called 6AE2013 or 6ET2013 and so on.

    I want to set up the main sheet with all the formula in place, prior to the sheets (which are referenced in the formula) being received. I will comment all the formula out using a macro, and when they do arrive I can simply uncomment the formula and hey presto!

    The problem I have is that rather than typing in each code into my formula, (there are several hundred different ones) because I know what the sheets will be called, I want to concatenate the sheet name within my formula, but I can't seem to get this to work. In Column C, I have a list of all my codes, I know my sheet name will be made from the code plus the year as shown above, but how do I concatenate this within my formula, the bits in red?

    Please Login or Register  to view this content.
    I tried

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    but neither work. Is it possible to do this?

    Many thanks

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Concatenate a Worksheet Name Problem

    Try it like this:

    IF(INDIRECT("'"&C1&"2013'!$C$11")="Non Lift",INDEX(INDEX(INDIRECT("'"&C1&"2013'!$1:$1000"),COLUMN(C1)+12,),ROW($C3)),"")

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Concatenate a Worksheet Name Problem

    Um!, this is not generating any error, but it isn't returning anything either. I thought maybe the " before the closing parenthesis might be in the wrong place, shouldn't it go after the 2013?, but I tried that and it then errors. Not quite sure what I'm missing?

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Concatenate a Worksheet Name Problem

    Okay, ignore that last post, I've managed to get it working now...

    Many thanks, that will save many hours work...

+ 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