Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
joeker
 
Posts: n/a
Default How do I insert the filename of the worksheet into a cell?

I always use a filename for my worksheet that defines the worksheet itself.
Say a student class record for subject "CEPS 361 2nd sem 2005-06 Hydraulics"
would have that excel name with an extension of .xls, i.e. "CEPS 361 2nd sem
2005-06 Hydraulics.xls". Now I want this subject name to appear on the class
record to identify that this class record is for that subject, and what I
would like to happen is that its time I change the name to another subject
(as I only copy an existing worksheet and rename it to another name for
another subject) it would also appear on the class record the new name of the
subject without physically editing the cell. I don't want to use a header or
a footer for this and I still do not know anything about macros. Is this
possible without using a header or a footer or even a macro? If it is may I
know how? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default How do I insert the filename of the worksheet into a cell?

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filena
me"))-SEARCH("[",CELL("filename"))-1)

HTH
--
AP

"joeker" a écrit dans le message de
...
I always use a filename for my worksheet that defines the worksheet

itself.
Say a student class record for subject "CEPS 361 2nd sem 2005-06

Hydraulics"
would have that excel name with an extension of .xls, i.e. "CEPS 361 2nd

sem
2005-06 Hydraulics.xls". Now I want this subject name to appear on the

class
record to identify that this class record is for that subject, and what I
would like to happen is that its time I change the name to another subject
(as I only copy an existing worksheet and rename it to another name for
another subject) it would also appear on the class record the new name of

the
subject without physically editing the cell. I don't want to use a header

or
a footer for this and I still do not know anything about macros. Is this
possible without using a header or a footer or even a macro? If it is may

I
know how? Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do I insert the filename of the worksheet into a cell?

Just a couple of warnings to the OP:

#1. The workbook has to be saved for this formula to work.
#2. It's better to include a reference to a cell in a worksheet in that
workbook so that the formula evaluates correctly.

If you don't include that reference, then the formula will return the name of
the activeworkbook when excel recalculates--not the name of the workbook with
the formula.

Change each
Cell("Filename")
to
Cell("filename",a1)

(any cell is ok)

Ardus Petus wrote:

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filena
me"))-SEARCH("[",CELL("filename"))-1)

HTH
--
AP

"joeker" a écrit dans le message de
...
I always use a filename for my worksheet that defines the worksheet

itself.
Say a student class record for subject "CEPS 361 2nd sem 2005-06

Hydraulics"
would have that excel name with an extension of .xls, i.e. "CEPS 361 2nd

sem
2005-06 Hydraulics.xls". Now I want this subject name to appear on the

class
record to identify that this class record is for that subject, and what I
would like to happen is that its time I change the name to another subject
(as I only copy an existing worksheet and rename it to another name for
another subject) it would also appear on the class record the new name of

the
subject without physically editing the cell. I don't want to use a header

or
a footer for this and I still do not know anything about macros. Is this
possible without using a header or a footer or even a macro? If it is may

I
know how? Thanks.


--

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
How do I insert the filename to a specific cell of the worksheet? Rozoga Excel Discussion (Misc queries) 1 February 10th 06 06:43 PM
hpw do I logic test a cell then copy the row to diff. SS Debi Excel Worksheet Functions 4 October 5th 05 09:42 PM
xls worksheet formatting a single cell Archer------------> Excel Discussion (Misc queries) 1 April 30th 05 07:25 PM
Refrencing another cell in a worksheet that "could" exist KimberlyC Excel Worksheet Functions 1 February 7th 05 08:09 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM


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