+ Reply to Thread
Results 1 to 4 of 4

File Pahtway in Cell

  1. #1
    Registered User
    Join Date
    05-27-2005
    Posts
    3

    File Pahtway in Cell

    What is the formula to tell you the pathway of the excell file you are currently in?

    (i.e. C:\my document\ms office\excel\mikes folder)

    I thought the formula was "=Cell()" but it does not work...

    please help

  2. #2
    Forum Contributor kraljb's Avatar
    Join Date
    05-26-2004
    Location
    Illinois
    MS-Off Ver
    2007 (recent change)
    Posts
    256
    You can create a function for that...

    In the VBE put the following
    Function FilePath() as String
    FilePath = activeworkbook.path
    End Function

    And then use that for your formula (however, the code would have to be added to any workbook you were going to use it on)

  3. #3
    PC
    Guest

    Re: File Pahtway in Cell

    =cell("filename")


    "Maxwell_5000" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > What is the formula to tell you the pathway of the excell file you are
    > currently in?
    >
    > (i.e. C:\my document\ms office\excel\mikes folder)
    >
    > I thought the formula was "=Cell()" but it does not work...
    >
    > please help
    >
    >
    > --
    > Maxwell_5000
    > ------------------------------------------------------------------------
    > Maxwell_5000's Profile:

    http://www.excelforum.com/member.php...o&userid=23810
    > View this thread: http://www.excelforum.com/showthread...hreadid=374638
    >




  4. #4
    Chip Pearson
    Guest

    Re: File Pahtway in Cell

    > =cell("filename")

    When you use this function, you should always include a cell
    reference in the function call:

    =CELL("filename",A1)

    It doesn't matter what the cell reference is, as long as it is on
    the same sheet as the function. The reason is that without the
    cell reference, Excel will use the ActiveSheet and ActiveWorkbook
    to return the filename, and these may not be the same as the
    sheet and workbook containing the formula.

    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "PC" <[email protected]> wrote in message
    news:[email protected]...
    > =cell("filename")
    >
    >
    > "Maxwell_5000"
    > <[email protected]>
    > wrote in message
    > news:[email protected]...
    >>
    >> What is the formula to tell you the pathway of the excell file
    >> you are
    >> currently in?
    >>
    >> (i.e. C:\my document\ms office\excel\mikes folder)
    >>
    >> I thought the formula was "=Cell()" but it does not work...
    >>
    >> please help
    >>
    >>
    >> --
    >> Maxwell_5000
    >> ------------------------------------------------------------------------
    >> Maxwell_5000's Profile:

    > http://www.excelforum.com/member.php...o&userid=23810
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=374638
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1