Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mariusz
 
Posts: n/a
Default Formula for name of Sheet

Hello!

Is there any formula which put name of sheet to cell on the sheet?
And very similar question:
Is there any formula which put name of file to any sheet?
I have to do something like above but without using VBA.

Thanks in Advance
Mariusz
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Sheet:

=REPLACE(CELL("Filename",A1),1,SEARCH("]",CELL("Filename",A1)),"")

File, without the path:

=REPLACE(REPLACE(CELL("Filename",A1),SEARCH("]",CELL("Filename",A1)),255,""),1,SEARCH("[",CELL("Filename",A1)),"")

mariusz wrote:
Hello!

Is there any formula which put name of sheet to cell on the sheet?
And very similar question:
Is there any formula which put name of file to any sheet?
I have to do something like above but without using VBA.

Thanks in Advance
Mariusz

  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi

this is an answer posted by Chip Pearson to a similar question awhile back:
---
If the current workbook is C:\Temp\Test.Xls and the sheet is Sheet1,


Use
=CELL("filename",A1)
to get the full name, including the sheet name. E.g.,


C:\Temp\[Test.Xls]Sheet1
Use
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,LEN(CELL("fil
ename"
,A1))-FIND("]",CELL("filename",A1)))
to get just the sheet name
Sheet1


Use


=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL
("file
name",A1))-FIND("[",CELL("filename",A1))-1)
to get just the file name
Test.Xls

Use
=LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)))
to get full name without sheet name


C:\Temp\[Test.xls]
Use
=SUBSTITUTE(SUBSTITUTE(LEFT(CELL("filename",A1),FI ND("]",CELL("filenam
e",A1)
)),"[",""),"]","")
to get full name without sheet name, and without square brackets
C:\Temp\Test.Xls


In all of the formulas above, you can use any cell instead of A1 --
just use a cell that is on the same sheet as the cell containing the
formula.


Cordially,
Chip Pearson
---

Cheers
JulieD

"mariusz" wrote in message
...
Hello!

Is there any formula which put name of sheet to cell on the sheet?
And very similar question:
Is there any formula which put name of file to any sheet?
I have to do something like above but without using VBA.

Thanks in Advance
Mariusz



  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

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

--

HTH

RP
(remove nothere from the email address if mailing direct)


"mariusz" wrote in message
...
Hello!

Is there any formula which put name of sheet to cell on the sheet?
And very similar question:
Is there any formula which put name of file to any sheet?
I have to do something like above but without using VBA.

Thanks in Advance
Mariusz



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a formula on a time sheet to calculate time in 1/. gschmid Excel Discussion (Misc queries) 2 January 18th 05 01:48 PM
Need help to set-up a formula on Excel work sheet? wiskeyjoexxx New Users to Excel 1 January 15th 05 02:59 PM
Formula = sheet tab name cindi Excel Worksheet Functions 6 January 5th 05 03:31 PM
what is the formula for changing the same cell on different sheet. scotty Excel Worksheet Functions 4 November 17th 04 09:51 PM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"