+ Reply to Thread
Results 1 to 4 of 4

Sheet name changing in cell

  1. #1
    Registered User
    Join Date
    05-03-2019
    Location
    East Yorkshire
    MS-Off Ver
    2007
    Posts
    56

    Sheet name changing in cell

    I have used the formula =MID(CELL("filename"),FIND("]",CELL("filename"))+1,31)
    I get the right sheet name but if I go to other sheets and come back the filename has changed to another sheet name. I have scoured my notes and googled it for ages yet still come up empty handed.

    I could understand it not working, or failing if I was changing sheet names but I am not...

    Is there another way to get the same result that it is a bit more stable than what I already have..... OR, or have I got something wrong in my sheet or code elsewhere that is effecting it?

    Thank you to anyone that can help.
    Last edited by k.tanton; 12-30-2022 at 11:06 AM. Reason: mispelt

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Sheet name changing in cell

    Link it to a specific cell:

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




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    05-03-2019
    Location
    East Yorkshire
    MS-Off Ver
    2007
    Posts
    56

    Re: Sheet name changing in cell

    I think that seems to have worked.

    Thank you very much - I have given you some more reputation.....

    I am very new to this so I am learning. Can you tell me why yours has worked yet the one I was using fails please?

    thanks in advance

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: Sheet name changing in cell

    It happens because the cursor must still be focussed on a cell in another sheet. When you return the focus to the sheet with the formula, it will (should!!) show sheet1 again.

    It's better to refer to a cell in the active sheet. It will then ALWAYS show Sheet1.

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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. Replies: 1
    Last Post: 05-27-2021, 04:45 PM
  2. VBA top change sheet name to changing cell value?
    By greenfox74 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 08-03-2019, 11:22 AM
  3. Changing Cell Color in Summary sheet from the sheet that Changes that sheet
    By rwhitlock11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2016, 11:51 AM
  4. Macro to copy text from sheet 1 to changing cell in sheet 2
    By Difflam88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-18-2015, 03:12 AM
  5. Auto fill static cell on separate sheet based on changing cells in another sheet
    By lawrence24 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-15-2014, 12:31 PM
  6. Formula to link cell on one sheet to changing cells on another sheet
    By Patish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2014, 12:55 PM
  7. [SOLVED] Copy Cell Value wich is changing every day to cell in another sheet
    By stanley in forum Excel General
    Replies: 12
    Last Post: 04-01-2012, 03:28 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