Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Display tab name in cell

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default Display tab name in cell

Hi,
copy the formula as follow in the cell where you want to display the name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Display tab name in cell

Thanks Eduardo
--
Traa Dy Liooar

Jock


"Eduardo" wrote:

Hi,
copy the formula as follow in the cell where you want to display the name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Display tab name in cell

I think you can safely leave the optional cell reference argument off of the
function calls as the file name would be the same no matter what cell is
referenced...

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

--
Rick (MVP - Excel)


"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Display tab name in cell

Eduardo has given you a worksheet formula solution to your question;
however, since you posted your question in the "programming" newsgroup, I
thought you might be looking for a UDF (User Defined Function). The UDF for
this question is quite simple...

Function TabName()
TabName = ActiveSheet.Name
End Function

To install the UDF, press Alt+F11 to go into the VB editor and click
Insert/Module from its menu bar, then copy/paste the above code into the
code window that opened up there. To use the UDF, just place this formula...

=TabName()

into any cell that you want the TabName to appear in.

--
Rick (MVP - Excel)


"Jock" wrote in message
...
How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default Display tab name in cell

Your welcome,

"Jock" wrote:

Thanks Eduardo
--
Traa Dy Liooar

Jock


"Eduardo" wrote:

Hi,
copy the formula as follow in the cell where you want to display the name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display tab name in cell

This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off of the
function calls as the file name would be the same no matter what cell is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Display tab name in cell

Nothing odd happens when I do that... the tab name appears the same in all
the windows for that formula. What are you suggesting should have happened?
My XL2003 is at Service Pack 2 if that might matter.

--
Rick (MVP - Excel)


"Dave Peterson" wrote in message
...
This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off of
the
function calls as the file name would be the same no matter what cell is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the
name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock


--

Dave Peterson


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Display tab name in cell

Rick,

I also thought he might like the UDF solution, but didn't offer it because
he seemed to like the formula route well enough. However, when I created the
UDF, it didn't always update when I manually CHANGED the sheet name. Then I
added Application.Volatile vbTrue, and that seemed to make it work. Is that
your experience also?

Thanks,

Eric

"Rick Rothstein" wrote:

Eduardo has given you a worksheet formula solution to your question;
however, since you posted your question in the "programming" newsgroup, I
thought you might be looking for a UDF (User Defined Function). The UDF for
this question is quite simple...

Function TabName()
TabName = ActiveSheet.Name
End Function

To install the UDF, press Alt+F11 to go into the VB editor and click
Insert/Module from its menu bar, then copy/paste the above code into the
code window that opened up there. To use the UDF, just place this formula...

=TabName()

into any cell that you want the TabName to appear in.

--
Rick (MVP - Excel)



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Display tab name in cell

Good catch! I completely forgot about the possibility the sheet name might
get changed. As you indicated, this is how the code should have be
constructed...

Function TabName()
Application.Volatile vbTrue
TabName = ActiveSheet.Name
End Function

Thanks for catching that omission for me.

--
Rick (MVP - Excel)


"egun" wrote in message
...
Rick,

I also thought he might like the UDF solution, but didn't offer it because
he seemed to like the formula route well enough. However, when I created
the
UDF, it didn't always update when I manually CHANGED the sheet name. Then
I
added Application.Volatile vbTrue, and that seemed to make it work. Is
that
your experience also?

Thanks,

Eric

"Rick Rothstein" wrote:

Eduardo has given you a worksheet formula solution to your question;
however, since you posted your question in the "programming" newsgroup, I
thought you might be looking for a UDF (User Defined Function). The UDF
for
this question is quite simple...

Function TabName()
TabName = ActiveSheet.Name
End Function

To install the UDF, press Alt+F11 to go into the VB editor and click
Insert/Module from its menu bar, then copy/paste the above code into the
code window that opened up there. To use the UDF, just place this
formula...

=TabName()

into any cell that you want the TabName to appear in.

--
Rick (MVP - Excel)






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display tab name in cell

Without the reference to the cell, the formula will use the activesheet (in the
activeworkbook).

Are you sure that you had multiple different windows in view?

Rick Rothstein wrote:

Nothing odd happens when I do that... the tab name appears the same in all
the windows for that formula. What are you suggesting should have happened?
My XL2003 is at Service Pack 2 if that might matter.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off of
the
function calls as the file name would be the same no matter what cell is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the
name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock


--

Dave Peterson


--

Dave Peterson
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Display tab name in cell

Okay, I see what you mean. I really do hate the CELL function as it seems to
be an odd one as functions go.

--
Rick (MVP - Excel)


"Dave Peterson" wrote in message
...
Without the reference to the cell, the formula will use the activesheet
(in the
activeworkbook).

Are you sure that you had multiple different windows in view?

Rick Rothstein wrote:

Nothing odd happens when I do that... the tab name appears the same in
all
the windows for that formula. What are you suggesting should have
happened?
My XL2003 is at Service Pack 2 if that might matter.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least
once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off
of
the
function calls as the file name would be the same no matter what cell
is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the
name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

--

Dave Peterson


--

Dave Peterson


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display tab name in cell

There are legal (from Windows standpoint) that make the =cell() formulas even
uglier.

Rick Rothstein wrote:

Okay, I see what you mean. I really do hate the CELL function as it seems to
be an odd one as functions go.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
Without the reference to the cell, the formula will use the activesheet
(in the
activeworkbook).

Are you sure that you had multiple different windows in view?

Rick Rothstein wrote:

Nothing odd happens when I do that... the tab name appears the same in
all
the windows for that formula. What are you suggesting should have
happened?
My XL2003 is at Service Pack 2 if that might matter.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least
once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off
of
the
function calls as the file name would be the same no matter what cell
is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the
name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Display tab name in cell

There are legal (from Windows standpoint) *file names* that make the =cell()
formulas even
uglier.

(I left out a couple of words.)

Dave Peterson wrote:

There are legal (from Windows standpoint) that make the =cell() formulas even
uglier.

Rick Rothstein wrote:

Okay, I see what you mean. I really do hate the CELL function as it seems to
be an odd one as functions go.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
Without the reference to the cell, the formula will use the activesheet
(in the
activeworkbook).

Are you sure that you had multiple different windows in view?

Rick Rothstein wrote:

Nothing odd happens when I do that... the tab name appears the same in
all
the windows for that formula. What are you suggesting should have
happened?
My XL2003 is at Service Pack 2 if that might matter.

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
This isn't true.

To test:

Create a workbook with a couple of worksheets (and save it at least
once)
then use this formula (without the range reference).
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)

And show multiple windows (window|new window in xl2003 menus)

And recalculate (hit F9) and watch what each formula evaluates to.


Rick Rothstein wrote:

I think you can safely leave the optional cell reference argument off
of
the
function calls as the file name would be the same no matter what cell
is
referenced...

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

--
Rick (MVP - Excel)

"Eduardo" wrote in message
...
Hi,
copy the formula as follow in the cell where you want to display the
name

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

If this was helpful please say yes. Thank you

"Jock" wrote:

How can I display the ActiveSheet.name in cell C5 for instance?

TIA
--
Traa Dy Liooar

Jock

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

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
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
display text in one cell as a number in an adjacent cell in excel Denno New Users to Excel 1 November 16th 06 05:13 PM
Display contents of cell in another cell as part of text string? [email protected] New Users to Excel 3 July 8th 06 07:44 PM
Conditional display - IF cell is blank, display next used row! Patti[_7_] Excel Programming 2 March 28th 06 10:33 PM
Shortcut key to display change the display from displaying cell values to cell formulae Adrian[_7_] Excel Programming 3 September 14th 04 12:07 PM


All times are GMT +1. The time now is 06:43 PM.

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"