Gå til hovedindhold

Hvordan henvises der til fanenavn i celle i Excel?

For at henvise til det aktuelle arkfane navn i en celle i Excel kan du få det gjort med en formel eller brugerdefineret funktion. Denne vejledning guider dig igennem som følger.

Henvis til det aktuelle arkfane navn i celle med formel
Henvis til det aktuelle arkfanenavn i cellen med brugerdefineret funktion
Henvis nemt til det aktuelle arkfane navn i celle med Kutools til Excel


Henvis til det aktuelle arkfane navn i celle med formel

Gør som følger for at henvise til navnet på det aktive arkfane i en bestemt celle i Excel.

1. Vælg en tom celle, kopier og indsæt formlen = MID (CELL ("filnavn", A1), FIND ("]", CELL ("filnavn", A1)) + 1,255) ind i formelbjælken, og tryk på Indtast nøgle. Se skærmbillede:

Nu henvises der til arkfanenes navn i cellen.

Indsæt let fanenavn i en bestemt celle, sidehoved eller sidefod i regnearket:

Kutools til Excel's Indsæt projektmappeoplysninger hjælpeprogram hjælper nemt med at indsætte aktivt fanenavn i en bestemt celle. Desuden kan du henvise til projektmappens navn, projektmappesti, brugernavn osv. Til en celle, regnearkets sidehoved eller sidefod efter behov. Klik for detaljer.
Download Kutools til Excel nu! (30-dages gratis spor)


Henvis til det aktuelle arkfanenavn i cellen med brugerdefineret funktion

Udover ovenstående metode kan du henvise til arkfanenavnet i en celle med brugerdefineret funktion.

1. Trykke andre + F11 at åbne Microsoft Visual Basic til applikationer vindue.

2. i Microsoft Visual Basic til applikationer vindue, skal du klikke på indsatte > Moduler. Se skærmbillede:

3. Kopier og indsæt nedenstående kode i kodevinduet. Og tryk derefter på andre + Q taster for at lukke Microsoft Visual Basic til applikationer vindue.

VBA-kode: navn på fanen reference

Function TabName()
  TabName = ActiveSheet.Name
End Function

4. Gå til den celle, som du vil henvise til det aktuelle arkfanenavn, indtast venligst = Fanenavn () og tryk derefter på Indtast nøgle. Derefter vises navnet på det aktuelle arkfane i cellen.


Henvis til det aktuelle arkfanenavn i celle med Kutools til Excel

Med Indsæt projektmappeoplysninger nytte af Kutools til Excel, kan du nemt henvise til arkfanenes navn i en hvilken som helst celle. Gør som følger.

1. klik Kutools Plus > Workbook > Indsæt projektmappeoplysninger. Se skærmbillede:

2. i Indsæt projektmappeoplysninger dialogboksen, vælg Navn på regneark i Information sektion og i Indsæt kl sektion, vælg Range valgmulighed, og vælg derefter en tom celle til lokalisering af arknavnet, og klik til sidst på OK .

Du kan se, at det aktuelle arknavn henvises til den valgte celle. Se skærmbillede:

  Hvis du vil have en gratis prøveperiode (30 dage) af dette værktøj, klik for at downloade det, og gå derefter til at anvende handlingen i henhold til ovenstående trin.


Demo: Henvis nemt til det aktuelle arkfanenavn i celle med Kutools til Excel

Kutools til Excel indeholder mere end 300 praktiske Excel-værktøjer. Gratis at prøve uden begrænsning på 30 dage. Download den gratis prøveperiode nu!

Bedste kontorproduktivitetsværktøjer

🤖 Kutools AI Aide: Revolutionér dataanalyse baseret på: Intelligent udførelse   |  Generer kode  |  Opret brugerdefinerede formler  |  Analyser data og generer diagrammer  |  Aktiver Kutools funktioner...
Populære funktioner: Find, fremhæv eller identificer dubletter   |  Slet tomme rækker   |  Kombiner kolonner eller celler uden at miste data   |   Runde uden formel ...
Super opslag: VLookup med flere kriterier    Multiple Value VLookup  |   VOpslag på tværs af flere ark   |   Fuzzy Lookup ....
Avanceret rulleliste: Opret hurtigt rulleliste   |  Afhængig rulleliste   |  Multivælg rulleliste ....
Column Manager: Tilføj et bestemt antal kolonner  |  Flyt kolonner  |  Skift synlighedsstatus for skjulte kolonner  |  Sammenlign områder og kolonner ...
Fremhævede funktioner: Grid fokus   |  Designvisning   |   Stor Formel Bar    Arbejdsbog & Ark Manager   |  Ressourcebibliotek (Autotekst)   |  Datovælger   |  Kombiner regneark   |  Krypter/Dekrypter celler    Send e-mails efter liste   |  Superfilter   |   Specielt filter (filter fed/kursiv/gennemstreget...) ...
Top 15 værktøjssæt12 tekst Værktøjer (tilføje tekst, Fjern tegn, ...)   |   50 + Chart Typer (Gantt kort, ...)   |   40+ Praktisk formler (Beregn alder baseret på fødselsdag, ...)   |   19 Indsættelse Værktøjer (Indsæt QR-kode, Indsæt billede fra sti, ...)   |   12 Konvertering Værktøjer (Tal til ord, Valutaomregning, ...)   |   7 Flet og del Værktøjer (Avancerede kombinere rækker, Opdel celler, ...)   |   ... og mere

Overlad dine Excel-færdigheder med Kutools til Excel, og oplev effektivitet som aldrig før. Kutools til Excel tilbyder over 300 avancerede funktioner for at øge produktiviteten og spare tid.  Klik her for at få den funktion, du har mest brug for...

Beskrivelse


Fanen Office bringer en grænseflade til et kontor med Office, og gør dit arbejde meget lettere

  • Aktiver redigering og læsning af faner i Word, Excel, PowerPoint, Publisher, Access, Visio og Project.
  • Åbn og opret flere dokumenter i nye faner i det samme vindue snarere end i nye vinduer.
  • Øger din produktivitet med 50 % og reducerer hundredvis af museklik for dig hver 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