Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pradhan
 
Posts: n/a
Default Pulling in the path to a filename

Is there anyway to pull either the complete path or alternatively, the parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Pulling in the path to a filename

Set myPath = Activeworkbook.Path

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pradhan" wrote in message
...
Is there anyway to pull either the complete path or alternatively, the

parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan



  #3   Report Post  
Gary''s Student
 
Posts: n/a
Default Pulling in the path to a filename

Use =CELL("filename") and parse out the part of the string that you need.
--
Gary's Student


"Pradhan" wrote:

Is there anyway to pull either the complete path or alternatively, the parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default Pulling in the path to a filename

It's probably better in this case to include a cell from that worksheet:

=cell("filename",a1)
(any old cell will do)


If you open two workbooks and put:
=cell("Filename")
in A1 of a worksheet in each workbook
then use window|arrange|tiled
to see both worksheets,
you'll see the difference.

Gary''s Student wrote:

Use =CELL("filename") and parse out the part of the string that you need.
--
Gary's Student

"Pradhan" wrote:

Is there anyway to pull either the complete path or alternatively, the parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan


--

Dave Peterson
  #5   Report Post  
Pradhan
 
Posts: n/a
Default Pulling in the path to a filename

Thank you, although I must confess, I see no difference between the 2
functions with and without the included reference but I suspect that is due
to my requesting "filename" information.

Pradhan

"Dave Peterson" wrote:

It's probably better in this case to include a cell from that worksheet:

=cell("filename",a1)
(any old cell will do)


If you open two workbooks and put:
=cell("Filename")
in A1 of a worksheet in each workbook
then use window|arrange|tiled
to see both worksheets,
you'll see the difference.

Gary''s Student wrote:

Use =CELL("filename") and parse out the part of the string that you need.
--
Gary's Student

"Pradhan" wrote:

Is there anyway to pull either the complete path or alternatively, the parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan


--

Dave Peterson



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default Pulling in the path to a filename

Did you try that test?

If you did, then you should have seen that both cells showed the workbook name
that was active when the recalculation occurred.

If you didn't see it, you may want to do it again.

Pradhan wrote:

Thank you, although I must confess, I see no difference between the 2
functions with and without the included reference but I suspect that is due
to my requesting "filename" information.

Pradhan

"Dave Peterson" wrote:

It's probably better in this case to include a cell from that worksheet:

=cell("filename",a1)
(any old cell will do)


If you open two workbooks and put:
=cell("Filename")
in A1 of a worksheet in each workbook
then use window|arrange|tiled
to see both worksheets,
you'll see the difference.

Gary''s Student wrote:

Use =CELL("filename") and parse out the part of the string that you need.
--
Gary's Student

"Pradhan" wrote:

Is there anyway to pull either the complete path or alternatively, the parent
folder of the xls file. For example, example.xls is located in the
c:\november directory,
I'd like to pull in either C:\november or just november.

Thanks
Pradhan


--

Dave Peterson


--

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
Are there template footers for "Filename and Path" in Excel. How? Barb22 Excel Discussion (Misc queries) 1 October 10th 05 09:04 AM
Excel 2K: Putting Filename & path in footer FinChase Excel Discussion (Misc queries) 1 March 14th 05 08:12 PM
Insert value of a cell as a filename Ralph Howarth Excel Worksheet Functions 0 January 18th 05 12:03 AM
Footer - FileName and Path bill_morgan_3333 Excel Discussion (Misc queries) 6 December 30th 04 01:47 AM
How do link to a remote worksheet using the path value in a field? Michael T. Links and Linking in Excel 3 December 11th 04 08:45 AM


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