Tab name into cell

G

Guest

Is there a formula to have the Tab name put into a cell.

I have my Tabs with a date of the end of a pay period for payroll. In the
worksheet, I have in a cell "Pay Period Ending" with the cell beside it being
the same date as the tab.

I want it to automatically have the same date as the tab for when I create
new worksheets and name the tabs.

PLEASE let me know if this is possible.

Thanks!
 
G

Guest

You may create an UDF for that. One simple example can be:
Function TabName()
TabName = ActiveSheet.Name
End Function
To add this UDF, open the Visual Basic Editor (Alt+F11), go to
Insert->Module and paste the the code above.

And use it on the cell "Pay Period Ending" with "=TabName()"

Hope this helps,
Miguel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top