Closed Thread
Results 1 to 14 of 14

Reference a worksheet name in a cell

  1. #1
    Registered User
    Join Date
    05-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    11

    Reference a worksheet name in a cell

    I have a similar issue as this thread and I was hoping someone might be able to lend some assistance.

    http://www.excelforum.com/excel-prog...worksheet.html

    I am trying to create a summary sheet that looks at the name of each tab. As someone types in the name of the tab, the corresponding cell on my summary page will update to reflect the name.

    (ie. A1=tab1, B1=tab2....)
    Last edited by jbcoe; 05-12-2010 at 08:43 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Reference a worksheet name in a cell

    as JBeaucaire has suggested in the thread you posted in previously, try

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

    to return the sheet name to a cell.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Reference a worksheet name in a cell

    If A1 contains the name of tab1, then

    =INDIRECT("'"&A1&"'!A1") will pull the information from that tab that is located in cell A1.

    If that is not what you need, then post a sample and explain a little more.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    04-30-2010
    Location
    brazil
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Reference a worksheet name in a cell

    Hello,
    you can do it by using INDIRECT.
    e.g: Letīs say you want to bring in sheet1 a value which is in sheet3 / cell A1. A simple way to do it is typing = "=Sheet3!A1" - I know this is not what you want and here comes INDIRECT.

    The same way to do it using indirect: =INDIRECT("Sheet"&A3&"!A1") - where A3 points to which sheet carries the information you want. That is: if you want sheet 3 - A3 = 3; if you want sheet 2 - A3=2 ... and so on.

    cheers
    Last edited by rrporto; 05-11-2010 at 08:27 AM.

  5. #5
    Registered User
    Join Date
    05-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Reference a worksheet name in a cell

    Quote Originally Posted by teylyn View Post
    as JBeaucaire has suggested in the thread you posted in previously, try

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

    to return the sheet name to a cell.
    This formula works awesome but it only seems to return the name of the current tab. How would I modify the formula to return the name of other tabs.

    Background: what I am trying to do is create a workbook for generating a building condition survey. Some properties we survey have multiple buildings. What I want to do is create a new tab for each building and have the building names on the tabs populate the summary page. I hope this clarifies.

    Thanks for all the help. This forum rocks.

  6. #6
    Registered User
    Join Date
    05-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Reference a worksheet name in a cell

    Quote Originally Posted by rrporto View Post
    Hello,
    you can do it by using INDIRECT.
    e.g: Letīs say you want to bring in sheet1 a value which is in sheet3 / cell A1. A simple way to do it is typing = "=Sheet3!A1" - I know this is not what you want and here comes INDIRECT.

    The same way to do it using indirect: =INDIRECT("Sheet"&A3&"!A1") - where A3 points to which sheet carries the information you want. That is: if you want sheet 3 - A3 = 3; if you want sheet 2 - A3=2 ... and so on.

    cheers
    I have been trying the indirect method, but I keep coming up with #REF in the cell. I am not sure if its the syntax of the formula I am getting wrong if there is something else going on. I have attached an image to illustrate.
    Attached Images Attached Images

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Reference a worksheet name in a cell

    Your sheet tabs are not called Sheet1, Sheet2, the are called Building 1, Building 2. Can you figure out what you need to change in the INDIRECT formula?

    You need to concatenate the text "Building " with a number. If you delete the blank rows in your table, you can use

    =INDIRECT("Building "&row(A1)&"!A1")

    and copy this down. If you insist on the blank rows in the table, it will get messier.

  8. #8
    Registered User
    Join Date
    05-10-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Reference a worksheet name in a cell

    I still had trouble getting the indirect to work despite everyone's efforts to help. I was however able to accomplish what I wanted using the following process. I probably took the long road, but I still got there.

    1. I used the formula =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256) in cell A1 of each worksheet to call the name of that worksheet.

    2. I then gave the cell a name.

    3. I then formatted the cell by selecting the custom option under the Number tab and used ;;; to hide the contents of cell A1.

    4. On my project summary page I used the named cell for each worksheet to populate the names.

    Now when the names of my worksheets change, my project summary worksheet will update accordingly.

    Thank you to everyone who assisted me with trying to solve this.

  9. #9
    Registered User
    Join Date
    09-06-2011
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Reference a worksheet name in a cell

    Great forum; I have recently had this question as well.

    I am also wondering... my worksheet names are actually dates (Ex. 12-1-11)

    I used the formula given: =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

    and it worked perfectly to reference the worksheet name into a cell of my choice.

    Now, if only I could format this date to show up as Thursday, December 1, 2011 instead of 12-1-11...

    Any suggestions?

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Reference a worksheet name in a cell

    Welcome to the forum,

    However, Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  11. #11
    Registered User
    Join Date
    09-06-2011
    Location
    Alabama
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Reference a worksheet name in a cell

    Sorry! I took the time to read the rules today... no more issues!

  12. #12
    Registered User
    Join Date
    09-22-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Reference a worksheet name in a cell

    I know this is an old post but I achieved doing INDIRECT Lookups to Worksheets by concatenating the single quotes in..

    i.e. INDIRECT(CONCATENATE("'",$A2,"'")&"!$A$2:$B$600")

  13. #13
    Forum Contributor
    Join Date
    12-08-2018
    Location
    pakistan
    MS-Off Ver
    2013-365
    Posts
    500

    Re: Reference a worksheet name in a cell

    Hi Taylyn,
    i am using this to find sheets name in sheet1:
    =INDIRECT("Invoice "&row(A1)&"!A1") but did not get sheet name in sheet1. can you help me?
    Thanks

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Reference a worksheet name in a cell

    Administrative Note:

    Gypsum01 & Majidsiddique

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original. Please start a new thread - See Forum rule #4

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Last edited by AliGW; 03-14-2019 at 01:33 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed 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