Thanks to this forum, I have learned to use the MID(..Cell(..))
functions to display the worksheet part of a filename in a cell, which I
use for automatically dating my weekly timecard, using the tab name as
the only reference I need to change. It then automatically dates the
days for me.
However, when I send a copy of the sheet to my dept. secretary, once on
her computer, the filename's path is completely different, and the
reference comes up as gibberish.
Any idea as to how to extract just the sheet name, without using the
whole filename? Or can I easily lock the cell's value, so that it
doesn't change even when the location changes?
Davey.
Davey, not sure what you are using but this will return just the sheet name,
=MID(CELL(quot;filenamequot;,A1),FIND(quot;]quot;,CELL(quot;filenamequot;,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 amp; 2003
quot;Daveyquot; gt; wrote in message
...
gt; Thanks to this forum, I have learned to use the MID(..Cell(..))
gt; functions to display the worksheet part of a filename in a cell, which I
gt; use for automatically dating my weekly timecard, using the tab name as
gt; the only reference I need to change. It then automatically dates the
gt; days for me.
gt;
gt; However, when I send a copy of the sheet to my dept. secretary, once on
gt; her computer, the filename's path is completely different, and the
gt; reference comes up as gibberish.
gt;
gt; Any idea as to how to extract just the sheet name, without using the
gt; whole filename? Or can I easily lock the cell's value, so that it
gt; doesn't change even when the location changes?
gt;
gt; Davey.
Paul B wrote:
gt; Davey, not sure what you are using but this will return just the sheet name,
gt; =MID(CELL(quot;filenamequot;,A1),FIND(quot;]quot;,CELL(quot;filenamequot;,A1)) 1,255)
gt;
That's what I have been using, without the 'FIND' part. It may make the
difference. I'll try it.
Thanks.
Davey.
Davey Wrote:
gt; Paul B wrote:
gt; gt; Davey, not sure what you are using but this will return just the
gt; sheet name,
gt; gt; =MID(CELL(quot;filenamequot;,A1),FIND(quot;]quot;,CELL(quot;filenamequot;,A1)) 1,255)
gt; gt;
gt; That's what I have been using, without the 'FIND' part. It may make
gt; the
gt; difference. I'll try it.
gt;
gt; Thanks.
gt;
gt; Davey.Hi Davey,
I believe the workbook must be saved before the formula will work.
If your interested in a macro try this (change the quot;A3quot; to the cell
where you want the result).
It wil go into the quot;WorkBook Modulequot;
This would be for all sheets in a Workbook, as they become active.
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Range(quot;A3quot;).FormulaR1C1 = ActiveSheet.Name
End Sub--
Desert Piranha------------------------------------------------------------------------
Desert Piranha's Profile: www.excelforum.com/member.php...oamp;userid=28934
View this thread: www.excelforum.com/showthread...hreadid=525081
- Dec 18 Thu 2008 20:48
Worksheet tab in cell
close
全站熱搜
留言列表
發表留言