Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Get sheet name in formula

Is there a formula that will return the current sheet name?

like: =Cell("Sheetname")

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Get sheet name in formula

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


In VBA, just:
MsgBox(ActiveSheet.Name)
--
Gary''s Student - gsnu200905


"xp" wrote:

Is there a formula that will return the current sheet name?

like: =Cell("Sheetname")

Thanks in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Get sheet name in formula

Just to add to Gary's Student's response.

This formula:
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,999)

will give you the name of the activesheet when excel recaluates--not necessarily
the name of the sheet containing the formula.

If you want the name of the sheet that contains the formula, then include a
cell's address in that formula (both spots). I like to use the cell address
that holds the formula:

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

ps. Both these formulas will only work if the workbook has been saved at least
once.

Gary''s Student wrote:

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

In VBA, just:
MsgBox(ActiveSheet.Name)
--
Gary''s Student - gsnu200905

"xp" wrote:

Is there a formula that will return the current sheet name?

like: =Cell("Sheetname")

Thanks in advance!


--

Dave Peterson
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
copying a template sheet and inputting a formula into another sheetthat references the new sheet A & S Excel Programming 1 July 29th 09 08:59 PM
Can I annotate a formula result in Sheet 1 in Sheet 2 by Cell Addr Rebecca Bauer Excel Worksheet Functions 2 August 27th 07 07:20 PM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 parag Excel Worksheet Functions 3 June 15th 06 10:29 PM
Lookup cell contents in on sheet based on a formula in second sheet Michael Wright via OfficeKB.com Excel Worksheet Functions 1 April 30th 05 04:11 PM


All times are GMT +1. The time now is 12:09 AM.

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

About Us

"It's about Microsoft Excel"