Crud!
I get exactly the same result whichever version I use.
(Excel2002/Win2K)
e.g. "D:\Docs\[TIMESHEET.xls]Summary"
As the previous poster said earlier in this thread
you have to strip out the directory and worksheet info
manually - which is rather messy to code.
What a friggin nightmare!
Thanks Micro$oft. (Not)
Ship
Shiperton Henethe
Just so you can see it:
Create a new workbook with 2 sheets.
Save it.
Window|new window
window|arrange horizontal
Put the formula
=cell("filename")
in A1 of each sheet.
Try it with
=cell("filename",a1)
You'll see the difference.
RWN wrote:
Dave;
I'm probably over my head here, but I don't understand the cell
reference.
When I use =Cell("filename") I get the path, workbook & worksheet name.
I'd appreciate it if you would enlighten me on what the reference
protects you from (I've found that a little bit of knowledge is indeed
dangerous
).
--
Regards;
Rob
------------------------------------------------------------------------
it's probably best to add a cell reference to that formula:
=cell("filename",a1)
Otherwise, you might not get what you expect.
RWN wrote:
You can (in Xl97 & 2000, at least) display the filename using
=Cell("Filename") (include the quotes around "Filename")
--
Regards;
Rob
----------------------------------------------------------------------
--
Incredibly complicated but yes this does seems to work!
With thanks.
Ship
P.S. The *reason* why I wanted this is
it is that I want to be able to have my printouts say very
distretely
what
the file
name is: i.e. it's there but you have to look for it!
(So I've formatted it to size=6 and colour=mid grey!)
I strongly request that in future microsoft allow
the headers and footer to be formatted - and that
would save us all a lot of hassle!
It would also be nice to have a filename() function!
<end>
One way
=LEFT(MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,255),FIND(
".",
MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,255))+3)
can be put in any cell
if you want the full path
=SUBSTITUTE(LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1))-1),"[
",""
)
--
Regards,
Peo Sjoblom
Hi
Anyone know of any msExcel function that will
give the name of the current file?
To be honest I want if for printout purposes
because I am trying to avoid the custom header
etc (which seems difficult/impossible to format)
Shiphen
Shiperton Henethe