ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheetname value (https://www.excelbanter.com/excel-programming/381126-sheetname-value.html)

crapit[_2_]

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



Bob Phillips

sheetname value
 
See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"crapit" wrote in message
...
Is it possible to reflect the worksheet name by value in a cell?





Gary''s Student

sheetname value
 
In the worksheet you can use the CELL() function.
In VBA something like:

Function sname() As String
sname = Application.Caller.Parent.Name
End Function
--
Gary's Student
gsnu200701


"crapit" wrote:

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




Mike

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

"crapit" wrote:

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




crapit[_2_]

sheetname value
 
Sorry, wrong qs, should be changing of worksheet name by value in a cell.
No VBA involve
"crapit" wrote in message
...
Is it possible to reflect the worksheet name by value in a cell?





Mike Fogleman

sheetname value
 
NO. VBA would be required.

Mike F
"crapit" wrote in message
...
Sorry, wrong qs, should be changing of worksheet name by value in a cell.
No VBA involve
"crapit" wrote in message
...
Is it possible to reflect the worksheet name by value in a cell?







Kari J Keinonen[_2_]

sheetname value
 
Hi!

Try this one!

Sub SheetNameCell()
Dim sName As String
sName = Range("A4").Text
Sheets(1).Select
Sheets(1).Name = sName
End Sub

Regards,
Kari J Keinonen

Chip Pearson

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?







All times are GMT +1. The time now is 04:50 AM.

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