Return Sheet Name into a Cell - Excel Formula

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Return the name of a sheet into a cell using an Excel formula. This video tutorial explores the use of the CELL, MID and FIND functions to display the worksheet name in a cell.
    By doing this with a formula, if the sheet name changes in the future it will automatically update in the cell. This may be useful to update other formulas such as hyperlinks.
    Master more than 100 Excel Formulas - goo.gl/QBaF1m
    Find more great free tutorials at;
    www.computerga...
    ** Online Excel Courses **
    The Ultimate Excel Course - Learn Everything ► bit.ly/Ultimat...
    Excel VBA for Beginners ► bit.ly/37XSKfZ
    Advanced Excel Tricks ► bit.ly/3CGCm3M
    Excel Formulas Made Easy ► bit.ly/2ujtOAN
    Creating Sports League Tables and Tournaments in Excel ► bit.ly/2Siivkm
    Connect with us!
    LinkedIn ► / 18737946
    Instagram ► / computergaga1
    Twitter ► / computergaga1

Комментарии • 91

  • @TerrY9048
    @TerrY9048 4 года назад +5

    =RIGHT(CELL("filename",B1),LEN(CELL("filename",B1))-FIND("]",CELL("filename",B1),1))

  • @marjoriejaneasis140
    @marjoriejaneasis140 2 года назад

    THANKS.

  • @TallerVRS
    @TallerVRS 2 года назад

    For those want to copy paste:
    ; version
    =MID(CELL("filename";B1);FIND("]";CELL("filename";B1))+1;32)
    , version
    =MID(CELL("filename",B1),FIND("]",CELL("filename",B1))+1,32)

  • @newelwany
    @newelwany 5 лет назад +15

    =MID(CELL("filename",B1),FIND("]",CELL("filename",B1))+1,32)

  • @93jewmoney
    @93jewmoney 2 года назад

    Any reason why this function would break on the mac version when using a copy version of a sheet? Every time I make a copy of a new sheet the existing functions will update to the last entered function. Thanks!

  • @wayneedmondson1065
    @wayneedmondson1065 6 лет назад +3

    Hi Alan.. great tip and video. I've used this formula for years to tag each sheet in a workbook with its name in a cell and then pass the cell values to VBA code for running a print routine on the sheets. That way, if I change my sheet name on the fly, I don't have to edit the code to keep the print macro working. I have code that passes the new name to the Sheets().PrintOut command via the Range().Value command. Through some Internet research, I learned that the file format for EXCEL is capable of a sheet name of 255 characters, but in actual use, Microsoft limits it to 31 characters. So, I've seen some people use 31 for the number of characters to display in the MID function and others use 255, presumably to have their formulas ready if MS ever increases the usable limit above 31. Anyway, it is a great tip and very useful. Thanks again and Thumbs up!

  • @oboealto
    @oboealto 5 лет назад +2

    Thanks for the great video! helped a lot. I wish MS Excel's product manager could see this. Really don't they think there should be a dedicated formula for this?

    • @Computergaga
      @Computergaga  5 лет назад +2

      You're welcome Erez. Maybe one day. Some amazing developments in Excel recently and in the near future though.

  • @alanf5615
    @alanf5615 3 года назад

    can you pleaspload the specific workbook for this video, or can you put the formula text into the comments section so we can easily copy pasete. thanks

  • @TaKeyliaRyan
    @TaKeyliaRyan 4 года назад +2

    You Rock! Thanks for explaining each text purpose.

  • @biankahoffmann604
    @biankahoffmann604 6 лет назад +1

    A fantastic video - well explained and exactly what i needed for my excel sheet. I loved that you explained how excel is "seeing" a function like this - this help alos in general for formulas for the future. Thanks

  • @restorationlifechurchminis3485
    @restorationlifechurchminis3485 6 лет назад +1

    I've been using this formula for a long time but never understood how or why it worked. But now I do. Thanks for the great explanation!

  • @win4cambo
    @win4cambo 5 лет назад

    I tried using my newly opened excel file with no name yet then it turned out without a value. i saved the file in a location with any name then i works.

  • @kishorkulkarni4120
    @kishorkulkarni4120 2 года назад

    Shall we extract sheet name in IF formula of Excel ?

  • @louisefarlow9808
    @louisefarlow9808 3 года назад +1

    Thank you so much for this, this is a tremendous help.

    • @Computergaga
      @Computergaga  3 года назад

      That is great to hear. You're welcome, Louise.

  • @erikvossenaar
    @erikvossenaar 2 года назад

    Exactly the info I was looking for; many thanks!

  • @commonbusinesssolution6484
    @commonbusinesssolution6484 7 лет назад +2

    yes i did it
    thank you so much

  • @cezco86
    @cezco86 3 года назад

    It doesn't work for me, why is that?

  • @rowlandburno1083
    @rowlandburno1083 2 года назад

    Great video, thanks for sharing your wizardry with this function. Accomplished exactly what I was needing to do and will incorporate it into other workbook as well! Keep up the good work!

  • @Tanko3691
    @Tanko3691 4 года назад

    I am eager to get this working but it wont run, keeps saying too many arguments and when I press on ok it homes in on the +1... please help.

    • @Computergaga
      @Computergaga  4 года назад

      Too many arguments missing that you have too many commas, or missing a closing bracket.

  • @MrTyrant258
    @MrTyrant258 4 года назад

    How do I find the sheet name code in Excel?

  • @ankitseth100
    @ankitseth100 3 года назад

    Wow,thanks that's actually I am searching on RUclips

  • @townnet
    @townnet 6 лет назад +1

    I follow exactly like the video but why i get #Value! ? My version is 2010.

    • @Computergaga
      @Computergaga  6 лет назад

      The version should not be an issue here. The #VALUE error normally indicates an issue with formatted. My first guess would be missing "" around filename. I would double check the formula for what might be missing.

    • @townnet
      @townnet 6 лет назад

      When i try at home, i type =Cell("filename, A1") enter, the cell is blank, no full path showing. But when i try at my company its works. Weird...

    • @Computergaga
      @Computergaga  6 лет назад

      The formula should read =CELL("filename",A1)

    • @townnet
      @townnet 6 лет назад

      Sorry, i miss type in the comment, actually i type same as your, not working at my home pc, but it works at my company pc.

    • @Computergaga
      @Computergaga  6 лет назад +2

      My next guess would be to check that you have saved the file, otherwise I am not sure.

  • @bch6707
    @bch6707 5 лет назад

    Thank you for posting this video. Is there a slick method for doing this the other way around?

  • @treetom77
    @treetom77 5 лет назад +1

    Thanks for the useful information.

  • @patl6705
    @patl6705 7 лет назад

    I want to name the tab based on a cell in my worksheet not the other way around. I have a spreadsheet to track my time and I want the tab named for the cell which contains the last day of the pay period. I've looked/tried several macros I found on the internet and I can't make any of them work. Most likely operator error as what I know about Excel would fit in a thimble. I'm on Win7, Excel 2013.

    • @Computergaga
      @Computergaga  7 лет назад

      Should not be too difficult. If this cell contains a date though then it may be symbols that are not allowed in sheet names causing the problem.
      The code below will assign the value of a cell to a sheet name. n the example below it is the value in cell F3 to the first worksheet of a workbook.
      Worksheets(1).Name = Range("F3").Value
      If you are not sure what cell the last day of the pay period would be ahead of time then the macro would need to find it first. You also need to know when you want the macro to run.

    • @patl6705
      @patl6705 7 лет назад +1

      Thanks. I was able to make this code work.
      Private Sub Worksheet_Calculate()
      If Range("f1").Text Me.Name Then Me.Name = Range("f1").Text
      End Sub

    • @Computergaga
      @Computergaga  7 лет назад

      Awesome! Worksheet Calculate event. Good work.

  • @TheOgi22
    @TheOgi22 4 года назад

    How to get sheet name in Google Sheets?
    From another sheet on same file from sheet URL adres?

    • @Computergaga
      @Computergaga  4 года назад

      I don't use Google sheets much and am unaware of the approach there.

    • @TheOgi22
      @TheOgi22 4 года назад +1

      @@Computergaga I've already found:
      =if(today()=today();regexreplace(cell("address";'SHEETNAME'!$A$1);"'?([^']+)'?!.*";"$1");"")

    • @Computergaga
      @Computergaga  4 года назад +1

      Excellent!

  • @NaveenKumar-sc9lq
    @NaveenKumar-sc9lq 3 года назад

    Hi, Can you please explain how to do this in Google spreadsheet ?

  • @eightysevenred
    @eightysevenred 6 лет назад +1

    Awesome tutorial!!!!! Thanks!!!!

  • @mohideenthassim7180
    @mohideenthassim7180 7 лет назад +1

    great little trick Alan, many thanks

  • @PaulMcClellanmn
    @PaulMcClellanmn 7 лет назад

    Love your excel tips!
    Is there a way to have the name of the last sheet in a work book display in a cell inside the first sheet? In other words, if a new sheet is added at the end, it will automatically update the newest sheet name ?

    • @Computergaga
      @Computergaga  7 лет назад +1

      I think this would only be possible with Excel VBA and creating a custom function.

    • @PaulMcClellanmn
      @PaulMcClellanmn 7 лет назад

      Computergaga, thanks for the reply

  • @BeautifulBengal
    @BeautifulBengal 4 года назад

    Do I have to save the file, before doing it?

  • @srishtigulati2164
    @srishtigulati2164 6 лет назад

    Any similar formula that can be used in Google spreadsheet?

    • @Computergaga
      @Computergaga  6 лет назад

      I'm not too familiar with Google sheets, but I know a lot of the formulas are similar.

    • @TheRiyazSaiyed
      @TheRiyazSaiyed 5 лет назад

      any luck

  • @Angelfams
    @Angelfams 6 лет назад +1

    brilliant

  • @jlelelr
    @jlelelr 4 года назад

    magic

  • @akshaydalvi2317
    @akshaydalvi2317 4 года назад

    Thank you so much! Great hack!

  • @joshuamanampiu6489
    @joshuamanampiu6489 5 лет назад

    Nice tip. Thank You.

  • @luigicassano7870
    @luigicassano7870 4 года назад

    very good!

  • @mithunmathivanan7491
    @mithunmathivanan7491 5 лет назад

    Can we get author name like this??

    • @Computergaga
      @Computergaga  5 лет назад +1

      Sure Mithun. You can extract text between the two / such as in this video - ruclips.net/video/Yf-aqzuuQzE/видео.html
      Using the CELL fucntion for the filename.

    • @mithunmathivanan7491
      @mithunmathivanan7491 5 лет назад

      Computergaga thank you: rather then extracting from text. Can’t we get through direct function??

    • @Computergaga
      @Computergaga  5 лет назад +1

      Yes sure. you don't need to reference a cell with text if that is what you mean. Can get it direct through the CELL function and other formulas to extract.
      There is no formula to directly get the author name, but you can with VBA.

  • @thijsvanderhorst8745
    @thijsvanderhorst8745 4 года назад

    Fine work

  • @majidsiddique8227
    @majidsiddique8227 5 лет назад

    Excellent

  • @ashiqmir2717
    @ashiqmir2717 3 года назад

    I wonder why people dislike this wonderful video.....