Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David P.
 
Posts: n/a
Default Cell to equal a worksheet's name

Is there a way for a cell to equal the worksheet's name?
--
David P.
  #2   Report Post  
Paul B
 
Posts: n/a
Default

David, try this, the file must have been saved for this to work

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"David P." wrote in message
...
Is there a way for a cell to equal the worksheet's name?
--
David P.



  #3   Report Post  
David P.
 
Posts: n/a
Default

Thank you Paul. Because I am a novice when it comes to code and where code
goes (other than where macros are stored by default) can you clarify what
your suggestion means...couple of questions:

1) Where does the code go that you suggested?

2) Would the code you suggested be a macro? that formats the value of the
specified cell to "equal the active worksheet's name"?

3)If my cell is A1 for example, which of the following parts of your
suggestion do I change:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

4) If it is a macro would the final format look like this (with the
neccesary changes made to your example)?:

Sub macroname()
'
' macroname Macro
' Macro recorded 6/10/2005 by BLINDS ETC
'

'
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
End Sub

5) Can you suggest a recource for me that might be titled "Visual Basic Code
for Dummies":) ? Thanks again.

--
David P.


"Paul B" wrote:

David, try this, the file must have been saved for this to work

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"David P." wrote in message
...
Is there a way for a cell to equal the worksheet's name?
--
David P.




  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

This formula goes into any cell that you want--it's a regular worksheet formula.

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

But the workbook does have to be saved at least once for this to work.

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html

John Walkenbach's is a nice one to start with. I think that John Green (and
others) is nice, too (for a second book??). See if you can find them in your
local bookstore and you can choose what one you like best.


David P. wrote:

Thank you Paul. Because I am a novice when it comes to code and where code
goes (other than where macros are stored by default) can you clarify what
your suggestion means...couple of questions:

1) Where does the code go that you suggested?

2) Would the code you suggested be a macro? that formats the value of the
specified cell to "equal the active worksheet's name"?

3)If my cell is A1 for example, which of the following parts of your
suggestion do I change:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

4) If it is a macro would the final format look like this (with the
neccesary changes made to your example)?:

Sub macroname()
'
' macroname Macro
' Macro recorded 6/10/2005 by BLINDS ETC
'

'
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
End Sub

5) Can you suggest a recource for me that might be titled "Visual Basic Code
for Dummies":) ? Thanks again.

--
David P.

"Paul B" wrote:

David, try this, the file must have been saved for this to work

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"David P." wrote in message
...
Is there a way for a cell to equal the worksheet's name?
--
David P.





--

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
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 06:57 AM
HOW DO I REFERENCE A CELL FROM THE RESULTS OF TWO WORKSHEETS TD Excel Discussion (Misc queries) 1 December 14th 04 03:16 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 7th 04 10:50 PM


All times are GMT +1. The time now is 11:13 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"