Thread: sheetname value
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default sheetname value

"Mike" wrote in message
=MID(CELL("filename"),(FIND("]",CELL("filename"))+1),50)


This formula will get you into trouble when the workbook calculates and the
sheet containing formula is not active. It will return the name of the sheet
that happens to be active when the calculation occurs, NOT the sheet that
contains the formula. To illustrate this, enter the formula on sheet1, go
to sheet2 and do CTRL+ALT+F9 to force a recalculation. You'll see that the
result of the formula is "Sheet2" not "Sheet1".

You need to modify the formula to include a cell reference on the current
sheet. It doesn't matter what cell you use, but you must use something.

=MID(CELL("filename",A1),(FIND("]",CELL("filename",A1))+1),50)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"Mike" wrote in message
...
=MID(CELL("filename"),(FIND("]",CELL("filename"))+1),50)

"crapit" wrote:

Is it possible to reflect the worksheet name by value in a cell?