I always use a filename for my worksheet that defines the worksheet itself.
Say a student class record for subject quot;CEPS 361 2nd sem 2005-06 Hydraulicsquot;
would have that excel name with an extension of .xls, i.e. quot;CEPS 361 2nd sem
2005-06 Hydraulics.xlsquot;. 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.
=MID(CELL(quot;filenamequot;),SEARCH(quot;[quot;,CELL(quot;filenamequot;)) 1,SEARCH(quot;]quot;,CELL(quot;filena
mequot;))-SEARCH(quot;[quot;,CELL(quot;filenamequot;))-1)
HTH
--
AP
quot;joekerquot; gt; a écrit dans le message de
news
gt; I always use a filename for my worksheet that defines the worksheet
itself.
gt; Say a student class record for subject quot;CEPS 361 2nd sem 2005-06
Hydraulicsquot;
gt; would have that excel name with an extension of .xls, i.e. quot;CEPS 361 2nd
sem
gt; 2005-06 Hydraulics.xlsquot;. Now I want this subject name to appear on the
class
gt; record to identify that this class record is for that subject, and what I
gt; would like to happen is that its time I change the name to another subject
gt; (as I only copy an existing worksheet and rename it to another name for
gt; another subject) it would also appear on the class record the new name of
the
gt; subject without physically editing the cell. I don't want to use a header
or
gt; a footer for this and I still do not know anything about macros. Is this
gt; possible without using a header or a footer or even a macro? If it is may
I
gt; know how? Thanks.
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(quot;Filenamequot;)
to
Cell(quot;filenamequot;,a1)
(any cell is ok)
Ardus Petus wrote:
gt;
gt; =MID(CELL(quot;filenamequot;),SEARCH(quot;[quot;,CELL(quot;filenamequot;)) 1,SEARCH(quot;]quot;,CELL(quot;filena
gt; mequot;))-SEARCH(quot;[quot;,CELL(quot;filenamequot;))-1)
gt;
gt; HTH
gt; --
gt; AP
gt;
gt; quot;joekerquot; gt; a écrit dans le message de
gt; news
gt; gt; I always use a filename for my worksheet that defines the worksheet
gt; itself.
gt; gt; Say a student class record for subject quot;CEPS 361 2nd sem 2005-06
gt; Hydraulicsquot;
gt; gt; would have that excel name with an extension of .xls, i.e. quot;CEPS 361 2nd
gt; sem
gt; gt; 2005-06 Hydraulics.xlsquot;. Now I want this subject name to appear on the
gt; class
gt; gt; record to identify that this class record is for that subject, and what I
gt; gt; would like to happen is that its time I change the name to another subject
gt; gt; (as I only copy an existing worksheet and rename it to another name for
gt; gt; another subject) it would also appear on the class record the new name of
gt; the
gt; gt; subject without physically editing the cell. I don't want to use a header
gt; or
gt; gt; a footer for this and I still do not know anything about macros. Is this
gt; gt; possible without using a header or a footer or even a macro? If it is may
gt; I
gt; gt; know how? Thanks.
--
Dave Peterson
- Dec 25 Tue 2007 20:41
How do I insert the filename of the worksheet into a cell?
close
全站熱搜
留言列表
發表留言