+ Reply to Thread
Results 1 to 10 of 10

CELL("filename")

  1. #1
    Registered User
    Join Date
    08-10-2015
    Location
    LOUISA, VA
    MS-Off Ver
    2013
    Posts
    3

    CELL("filename")

    I have this formula in the lower right corner of my sheet.
    =RIGHT(CELL("filename"),LEN(CELL("filename")))
    It shows me the path of the file location in that cell.

    Strange that when I open another sheet I have saved before while the file with the formula is open, that cell picks up the opening file info and displays it as if it were linked to it.?
    If I calculate the the sheet with the formula the cell returns to the correct file info.

    I would consider this a bug if yall cant help me.
    Thanks

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: CELL("filename")

    Try this -

    =RIGHT(CELL("filename",A1),LEN(CELL("filename",A1)))

    And I am not sure why you need the Right Function..

    This will give you the same result wont it?

    =CELL("filename",A1)
    Last edited by NeedForExcel; 08-11-2015 at 07:21 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: CELL("filename")

    Not a bug. That's just how it works.

    If you don't include a cell reference (it can be to ANY cell), the formula will return the file name of the last file that generated a calculation.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: CELL("filename")

    Thank you for the Rep.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

    P.S. Bugs in Excel aren't so easy to find..

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: CELL("filename")

    @ Tony

    Trying to understand the behaviour.

    According to this MS Website (https://support.office.com/en-ca/art...f-955d67c2b2cf)

    It says -

    Reference Optional. The cell that you want information about. If omitted, the information specified in the Info_type argument is returned for the last cell that was changed. If the reference argument is a range of cells, the CELL function returns the information for only the upper left cell of the range.

    So when an Excel file is opened, does it generate some sort of a calculation? Is it Excel's default behavior?

  6. #6
    Registered User
    Join Date
    08-10-2015
    Location
    LOUISA, VA
    MS-Off Ver
    2013
    Posts
    3

    Re: CELL("filename")

    Thanks for the help guys
    I'm good

  7. #7
    Registered User
    Join Date
    08-10-2015
    Location
    LOUISA, VA
    MS-Off Ver
    2013
    Posts
    3

    Re: CELL("filename")

    As far as the "Right" in the formula.. I actually copied that from another cell that I wanted abbreviated info shown
    Sorry for the confusion.. Glad to be back Excel world. been out for 9 years.. started when Excel had a shell of its own (Prewindows) in the DOS environment. Chose Excel over Lotus 123 and never looked back.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: CELL("filename")

    Try this...

    Create 2 files. Save them and give them names.

    File1
    File2

    With both files open...

    Enter this formula in cell A1 of File2:

    =CELL("filename")

    Note the result of the formula.

    Now, switch to File1 and enter this formula in cell A1:

    =RAND()

    Now, switch to File2 and note the entry in cell A1.

    If you include a cell reference in the formula:

    =CELL("filename",A1)

    The above scenario will not happen.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: CELL("filename")

    You're welcome. We appreciate the feedback!

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: CELL("filename")

    And to answer your specific question, yes, when Excel opens a file, it performs the calculations by default
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 03-09-2021, 11:54 PM
  2. Replies: 1
    Last Post: 09-09-2013, 11:41 AM
  3. CELL("filename") returns the same sheet name on three different sheets
    By 6StringJazzer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-21-2013, 06:37 PM
  4. Circular Reference? - INDIRECT and CELL("filename") Usage
    By Nicked in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2012, 01:20 PM
  5. [SOLVED] "Save As" in current directory, filename from cell value
    By AlexCoyne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2012, 08:33 PM
  6. Replies: 0
    Last Post: 08-09-2012, 04:31 PM
  7. [SOLVED] CELL("filename") acting Volatile? (in assoc. with PULL)
    By sstackhoTEST@yahooTEST.com in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-03-2006, 10:40 AM
  8. [SOLVED] =CELL("filename") function related question
    By wfcpyc in forum Excel General
    Replies: 2
    Last Post: 01-07-2005, 04:06 PM

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