Forum Discussion
Excel cell reference to sheet number
Hallo,
wie wäre die Syntax oder Formel für einen Zellbezug zu einer Zelle in einem anderen Blatt der selben Arbeitsmappe, wenn ich im Bezug die Blattnummer anstelle des Blattnamens verwenden möchte?
Beispiel:
Meine Arbeitsmappe enthält 3 Blätter "Tabelle 1", "Tabelle 2" und "Tabelle 3". Die Register-Namen ändere ich von
"Tabelle 1" zu "Übersicht",
"Tabelle 2" zu "A.1" und
"Tabelle 3" zu "A.2".
Ich möchte nun im ersten Blatt in der Zelle Übersicht!A1 einen dynamischen Zellbezug zur Zelle A1 im zweiten Tabellenblatt herstellen, ohne dessen Blattnamen "A.1" zu verwenden, indem ich eine Formel-Syntax für einen Zellbezug ähnlich wie =Blattnummer(2)!A1 (ich weiß: gibt es nicht) finde, denn ich möchte die Blattnamen später ändern können, ohne dass sich die Bezüge dadurch ändern.
Im Blatt "Übersicht" kann ich mit =BLATT() sehen, dass es sich um das erste Blatt handelt.
Mit =BLÄTTER() finde ich heraus, wie viele Blätter meine Arbeitsmappe insgesamt enthält (3).
Also möchte ich in "Übersicht" die dynamischen Zellbezüge für die folgenden Arbeitsblätter 2 und 3 über =INDIREKT(...usw.) zusammenstellen, ohne ein VBA-Makro einzusetzen.
Für einen Hinweis wäre ich sehr dankbar - ich habe gefühlt schon "alles" versucht. Vielen Dank.
2 Replies
- PeterBartholomew1Silver Contributor
I think the sheet code name is only available within VBA. It is possible to access the sheet name using
= CELL("directory")
but I think a better option would be to use defined names or Table names in preference to direct cell references.
- Bernd13505Copper Contributor
PeterBartholomew1 Hi Peter, thanks a lot for your answer.
The function =CELL("directory"...) is well known to me - it makes it easy to extract the "given name" of a worksheet and the "path" of a workbook.
But that's not what I need. In principle, I need a kind of reverse function of =SHEET().
=SHEET() gives back the actual position of a sheet in the workbook.
I want to address a certain cell in a worksheet which is at a certain position in the workbook.
Example: if cell A1 of the second worksheet contains the function =SHEET(), the cell value is 2.
If I would move that second worksheet on another position in the workbook, let's say the third position, then that cell A1 with the function =SHEET() would give back the cell value 3.
My wish is as follows (example):
In cell A1 of the first worksheet I would type in a function which addresses for example the cell A1 in the second worksheet, the second worksheet is named "Sheet-2" by myself as its "given name". As long as I use the reference =Sheet-2!A1, I would easily get the value of that cell. And I could move that "Sheet-2" to another position (for example third position) in the workbook and would still get the same value with the same reference =Sheet-2!A1. But that's not what I want: my cell reference in the first sheet shall instead give me the value of cell A1 in the second sheet.
I search the syntax how to use the worksheet number (=the position of the worksheet in the workbook) in a cell reference.