Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Display filename in cell

Hi,

I was using the ' =Cell("Filename") ' function in excel,

But I want to display only the path "= C:\Folder1\Folder2\"
And then I want to display the worksheet name = "worksheet1"

Is there a way to do this?

THanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 341
Default Display filename in cell

Path is
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)

Sheet name is
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

more here
http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
Allllen


"Jeff" wrote:

Hi,

I was using the ' =Cell("Filename") ' function in excel,

But I want to display only the path "= C:\Folder1\Folder2\"
And then I want to display the worksheet name = "worksheet1"

Is there a way to do this?

THanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Display filename in cell

This will return the worksheet name:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

and this will return the folder:
=MID(CELL("filename",A1),1,FIND("[",CELL("filename",A1))-1)



Jeff wrote:

Hi,

I was using the ' =Cell("Filename") ' function in excel,

But I want to display only the path "= C:\Folder1\Folder2\"
And then I want to display the worksheet name = "worksheet1"

Is there a way to do this?

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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
substitute the filename in a cell reference with a string in another cell. flummi Excel Discussion (Misc queries) 11 February 22nd 06 01:14 PM
display a drop-down list based on the content of another cell Joe S Excel Discussion (Misc queries) 6 December 6th 05 12:23 AM
Display text 1024 characters in a cell Martin Excel Worksheet Functions 6 November 12th 05 11:25 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


All times are GMT +1. The time now is 11:22 AM.

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"