+ Reply to Thread
Results 1 to 9 of 9

Creating a formula which will work if the worksheet name is changed

  1. #1
    Registered User
    Join Date
    09-14-2017
    Location
    Vancouver
    MS-Off Ver
    2016
    Posts
    6

    Question Creating a formula which will work if the worksheet name is changed

    Hi,

    I have a spreadsheet which will be used as a template and when new students arrive the worksheets will be updated to say the students name.

    How can I create formulas which VLookup into specific worksheets that won't need updating as soon as the worksheet name is changed?

    TIA

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Creating a formula which will work if the worksheet name is changed

    Once the formula is in place, you can rename the sheet as you desire and the formula will update with the new name.

  3. #3
    Registered User
    Join Date
    09-14-2017
    Location
    Vancouver
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating a formula which will work if the worksheet name is changed

    Thank you. I didn't realise it did it automatically. That's great

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Creating a formula which will work if the worksheet name is changed

    You're welcome.

  5. #5
    Registered User
    Join Date
    09-14-2017
    Location
    Vancouver
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating a formula which will work if the worksheet name is changed

    As an additional question, I have been searching all over the web for a formula which will pick up the worksheet name so when the worksheets are renamed they will automatically pick up the new name.

    I keep seeing this formula: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]", CELL("filename",A1))-FIND("[",CELL("filename",A1))-1) but I'm unsure how I need to amend it to work in my spreadsheet. Currently I have 30 worksheets named #1, #2, #3 etc but eventually they will be renamed to student's names?

    TIA

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Creating a formula which will work if the worksheet name is changed

    From your comments I'm assuming you're creating some sort of database from which you'll need to generate reports or other analyses.
    If that's the case then I'd urge you to rethink your strategy.

    Whenever you feel the need to create separate sheets for stuff like staff names, departments, weeks, products...or in fact anything where individual sheets contain essentially the same information in the same layout with just one unique identifier then think again.

    Almost without exception you should capture this stuff in a normalised two dimensional table on a single sheet with an extra column to hold the unique identifier.
    Once that's in place then any analysis or summarisation is easily achieved with a Pivot Table.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Registered User
    Join Date
    09-14-2017
    Location
    Vancouver
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating a formula which will work if the worksheet name is changed

    For example in the attached image......the worksheet name is currently #1 but will be renamed to a student's name i.e. Bob. When this changes I want the worksheet name 'Bob' to appear in the 'student name' cell.
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    09-14-2017
    Location
    Vancouver
    MS-Off Ver
    2016
    Posts
    6

    Re: Creating a formula which will work if the worksheet name is changed

    Hi, It's a very complicated spreadsheet tracking a lot of data and I am simply helping them set up a few additional features. It's not in my remit to restructure the spreadsheet and it works for the simple analysis we do for now. Thanks for your advice though

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Creating a formula which will work if the worksheet name is changed

    Quote Originally Posted by jo3810 View Post
    Hi, It's a very complicated spreadsheet tracking a lot of data and I am simply helping them set up a few additional features. It's not in my remit to restructure the spreadsheet and it works for the simple analysis we do for now. Thanks for your advice though
    Do you never want to summarise information from across all students, e.g. number of hours per lesson, number of lessons per teacher, number of teachers per lesson, variance between target and actual hours per lesson...etc.. I guess you get the point.

+ 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] Trouble with Worksheet Change when Target Cell Changed by Formula
    By phelbin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2016, 04:00 PM
  2. [SOLVED] Worksheet Calculate VBA when Formula Column Changed
    By BVT3030 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-07-2016, 08:38 AM
  3. Help creating a formula or VB code to work if a date is within a certain range.
    By npsnps in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2015, 02:36 PM
  4. Code won't work when sheetname is changed
    By wedzmer in forum Excel General
    Replies: 56
    Last Post: 06-29-2015, 10:11 PM
  5. Conditional formatting should work if the value in cell get changed within 5 seconds
    By amitnarwani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2014, 01:12 PM
  6. Error in Index & Match Formula due to Defined Names Worksheet is Getting Changed!
    By Rajeshkumar R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2013, 08:37 AM
  7. Nothing has changed but macros won't work!?!
    By JFamilo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2005, 04:23 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