Hoppa till huvudinnehåll

Hur refererar jag till fliknamn i cellen i Excel?

För att hänvisa till det aktuella bladflikens namn i en cell i Excel kan du få det gjort med en formel eller användardefinieringsfunktion. Denna handledning guidar dig igenom följande.

Hänvisa namnet på det aktuella bladfliken i cellen med formeln
Referera till det aktuella fliknamnet i cellen med användardefinieringsfunktion
Referera enkelt till det aktuella namnet på fliken i cellen med Kutools för Excel


Hänvisa namnet på det aktuella bladfliken i cellen med formeln

Gör enligt följande för att referera till det aktiva fliknamnet i en specifik cell i Excel.

1. Välj en tom cell, kopiera och klistra in formeln = MID (CELL ("filnamn", A1), HITTA ("]", CELL ("filnamn", A1)) + 1,255 XNUMX) in i formelfältet och tryck på ange nyckel. Se skärmdump:

Nu hänvisas till bladflikens namn i cellen.

Infoga enkelt fliknamn i en specifik cell, sidhuvud eller sidfot i kalkylbladet:

Smakämnen Kutools för Excel's Infoga arbetsbokinformation verktyget hjälper dig att enkelt infoga aktivt fliknamn i en specifik cell. Dessutom kan du referera till arbetsbokens namn, arbetsbokens sökväg, användarnamn etc. i en cell, kalkylbladets sidhuvud eller sidfot efter behov. Klicka för detaljer.
Ladda ner Kutools för Excel nu! (30 dagars gratis spår)


Referera till det aktuella fliknamnet i cellen med användardefinieringsfunktion

Förutom metoden ovan kan du referera till flikens namn i en cell med användardefinieringsfunktion.

1. Tryck andra + F11 att öppna Microsoft Visual Basic för applikationer fönster.

2. I Microsoft Visual Basic för applikationer fönstret klickar Insert > Modulerna. Se skärmdump:

3. Kopiera och klistra in koden nedan i kodfönstret. Och tryck sedan på andra + Q för att stänga Microsoft Visual Basic för applikationer fönster.

VBA-kod: referensflikens namn

Function TabName()
  TabName = ActiveSheet.Name
End Function

4. Gå till cellen som du vill hänvisa till det aktuella bladflikens namn, ange = Fliknamn () och tryck sedan på ange nyckel. Då visas nuvarande fliknamn i cellen.


Referera det aktuella bladflikens namn i cellen med Kutools för Excel

Med Infoga arbetsbokinformation nytta av Kutools för Excel, kan du enkelt referera till fliknamnet i vilken cell du vill. Gör så här.

1. klick Kutools Plus > Arbetsbok > Infoga arbetsbokinformation. Se skärmdump:

2. I Infoga arbetsbokinformation dialogrutan väljer du Kalkylbladets namn i Information avsnittet och i Sätt in vid avsnitt, välj Mätområde och välj sedan en tom cell för att hitta arkets namn och klicka slutligen på OK knapp.

Du kan se att det aktuella arknamnet hänvisas till den valda cellen. Se skärmdump:

  Om du vill ha en gratis provperiod (30 dagar) av det här verktyget, klicka för att ladda ner den, och gå sedan till för att tillämpa operationen enligt ovanstående steg.


Demo: Referera enkelt till det aktuella namnet på fliken i cellen med Kutools för Excel

Kutools för Excel innehåller mer än 300 praktiska Excel-verktyg. Gratis att prova utan begränsning på 30 dagar. Ladda ner den kostnadsfria testversionen nu!

Bästa kontorsproduktivitetsverktyg

🤖 Kutools AI Aide: Revolutionera dataanalys baserat på: Intelligent utförande   |  Generera kod  |  Skapa anpassade formler  |  Analysera data och generera diagram  |  Anropa Kutools funktioner.
Populära funktioner: Hitta, markera eller identifiera dubbletter   |  Ta bort tomma rader   |  Kombinera kolumner eller celler utan att förlora data   |   Rund utan formel ...
Superuppslag: Flera kriterier VLookup    VLookup med flera värden  |   VSök över flera ark   |   Fuzzy Lookup ....
Avancerad rullgardinslista: Skapa snabbt en rullgardinslista   |  Beroende rullgardinslista   |  Flervals-rullgardinslista ....
Kolumnhanterare: Lägg till ett specifikt antal kolumner  |  Flytta kolumner  |  Växla synlighetsstatus för dolda kolumner  |  Jämför intervall och kolumner ...
Utvalda funktioner: Rutnätsfokus   |  Designvy   |   Stor formelbar    Arbetsbok & Bladhanterare   |  Resursbibliotek (Automatisk text)   |  Datumväljare   |  Kombinera arbetsblad   |  Kryptera/Dekryptera celler    Skicka e-postmeddelanden efter lista   |  Superfilter   |   Specialfilter (filtrera fet/kursiv/genomstruken...) ...
Topp 15 verktygssatser12 text verktyg (lägga till text, Ta bort tecken, ...)   |   50+ Diagram Typer (Gantt Chart, ...)   |   40+ Praktiskt Formler (Beräkna ålder baserat på födelsedag, ...)   |   19 Införande verktyg (Infoga QR-kod, Infoga bild från sökväg, ...)   |   12 Konvertering verktyg (Siffror till ord, Valutaväxling, ...)   |   7 Slå ihop och dela verktyg (Avancerade kombinera rader, Dela celler, ...)   |   ... och mer

Uppgradera dina Excel-färdigheter med Kutools för Excel och upplev effektivitet som aldrig förr. Kutools för Excel erbjuder över 300 avancerade funktioner för att öka produktiviteten och spara tid.  Klicka här för att få den funktion du behöver mest...

Beskrivning


Fliken Office ger ett flikgränssnitt till Office och gör ditt arbete mycket enklare

  • Aktivera flikredigering och läsning i Word, Excel, PowerPoint, Publisher, Access, Visio och Project.
  • Öppna och skapa flera dokument i nya flikar i samma fönster, snarare än i nya fönster.
  • Ökar din produktivitet med 50 % och minskar hundratals musklick för dig varje dag!
Comments (24)
Rated 0.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
sorry your formulas and everything are incorrect on this page.
after direct copy/paste your THEORIES were WRONG
ZERO OUT OF TWO ATTEMPTS WORKED USING YOUR SUGGESTIONS
Rated 0.5 out of 5
This comment was minimized by the moderator on the site
Hi Julia,
What kind of erro did you get?
To be mentioned, the formula provided in the post can only be applied in English system environment Excel. If you have Excel in a different language than English, please convert the formula from English to the language you are currently using.
You can translate the formula in this page: https://de.excel-translator.de/translator/
This comment was minimized by the moderator on the site
The formula at the top won't work until you save the file to your hard drive.
This comment was minimized by the moderator on the site
If you're using Excel Online. I found a solution for this issue.

You need to use 2 cells to make it work. As long as you have a cell that has the reference of a tab in its name, you can use FORMULATEXT() to turn that cells formula into a string and then extract the name that way. I can't imagine a scenario where you will want to reference another sheet and you wont already have a cell referencing that sheet for information on it, but you can always just make a blank/hidden (however you want to do it) cell that is just referencing the other sheet to set this formula up. In the below example, it is referencing cell B1 and cell B1 just contains =Sheet2!A1 as a reference to the sheet I want to name. If you use a name for a sheet with a space in it (example: Sheet 1) it would show up as (='Sheet 1'A1). I used an IF function and an ISERROR function to search if the string contains a space or not and two MID functions to extract the name of the sheet from both scenarios. If you update the name of the referenced sheet, cell B1 will change its formula and subsequently change the string and output the correct name each time.

=IF(ISERROR(FIND(" ",FORMULATEXT(B1))),MID(FORMULATEXT(B1),2,FIND("!",FORMULATEXT(B1))-2),MID(FORMULATEXT(B1),3,FIND("!",FORMULATEXT(B1))-4))
This comment was minimized by the moderator on the site
If you're using Excel Online. I found a solution for this issue.

You need to use 2 cells to make it work. As long as you have a cell that has the reference of a tab in its name, you can use FORMULATEXT() to turn that cells formula into a string and then extract the name that way. I can't imagine a scenario where you will want to reference another sheet and you wont already have a cell referencing that sheet for information on it, but you can always just make a blank/hidden (however you want to do it) cell that is just referencing the other sheet to set this formula up. In the below example, it is referencing cell B1 and cell B1 just contains =Sheet2!A1 as a reference to the sheet I want to name. If you use a name for a sheet with a space in it (example: Sheet 1) it would show up as (='Sheet 1'A1). I used an IF function and an ISERROR function to search if the string contains a space or not and two MID functions to extract the name of the sheet from both scenarios. If you update the name of the referenced sheet, cell B1 will change its formula and subsequently change the string and output the correct name each time.

=IF(ISERROR(FIND(" ",FORMULATEXT(B1))),MID(FORMULATEXT(B1),2,FIND("!",FORMULATEXT(B1))-2),MID(FORMULATEXT(B1),3,FIND("!",FORMULATEXT(B1))-4))
This comment was minimized by the moderator on the site
What I really want is to name some tabs using with the names on some cells from another sheet (same document of course). How can I do that?
This comment was minimized by the moderator on the site
Hi, I used the above suggestions but the first formula to reference the tab sheet name will not work on "excel" online. The second works, but the "Tabname" keeps showing the same tab name for all tabs on the workbook.
This comment was minimized by the moderator on the site
Hi,
Sorry we didn't test in excel online. Can't help you with that yet. Thank you for your comment.
This comment was minimized by the moderator on the site
hello, i am having trouble referencing a sheet name into a cell with online excel
This comment was minimized by the moderator on the site
Excellent, thanks! Per: Reference the current sheet tab name in cell with formula
This comment was minimized by the moderator on the site
Sorry, the comment line is wrong - should be Ctrl-Alt-Shift-F9
This comment was minimized by the moderator on the site
FYI, you need to have more than one sheet in your workbook for this to work. Otherwise, the formula will display the filename but no sheet name.
This comment was minimized by the moderator on the site
Good Day,
Thank you for your comment. I have tested the formula in a workbook that has only one sheet, but everything was running smoothly. The formula only displays the sheet name no matter how many worksheets existing in a workbook.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations