Author Options:

Can someone tell me how to use the command Sheetname in excel? Answered

I need to incorporate a sheet name command in a cell, then after that refer to that sheetname command in a macro.



6 years ago

This formula works fine for my German Excel:

I guess the English translation should be something like that:


Step back one phase...

WHAT are you trying to do? If the macro is in the workbook it should be able to refer to any given sheet enumerated from the book.

Thats not completely true, if you look at my other question. After recording the macro it refers to the root file for making a graph, So instead of "234" I need it to be something like =E5 and in cell E5 it should be the command sheetname, rendering the macro universal to all files with that same format.

I don't know the specifics, but I'm sure there is a way to have a macro self-aware of the file it is currently in...and to list the sheets in a function also, referring to sheets by their value, 0, 1, 2, etc...its been forever since I did any macros though.

But if you know anything about macros please do help, Not trying to shut you down in the reply below, just clarifying