ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Update cell contents based on worksheet name (https://www.excelbanter.com/excel-discussion-misc-queries/153468-update-cell-contents-based-worksheet-name.html)

PJ

Update cell contents based on worksheet name
 
Is it possible to have the contents of a cell updated based on the name of a
worksheet?

Dave Peterson

Update cell contents based on worksheet name
 
A formula like:
=RIGHT(CELL("filename",A1),
LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

will return the name of the worksheet (if the workbook has been saved).

You can use that long formula in an if statement--or put that formula in a cell,
then use a reference to that cell in your formula.

PJ wrote:

Is it possible to have the contents of a cell updated based on the name of a
worksheet?


--

Dave Peterson


All times are GMT +1. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com