+ Reply to Thread
Results 1 to 2 of 2

Issue with Cell("filename")

  1. #1
    Registered User
    Join Date
    03-03-2005
    Posts
    41

    Issue with Cell("filename")

    Hi All
    I have a spreadsheet that is relevant to a particular year
    So by convention the year is included in the filename {Descriptive name (year).xlsx}
    I extract the year using the Cell("filename") function and all is fine

    BUT

    If I copy and paste values from this workbook into another workbook the Cell() function returns #Value (presumably because it is using the filename of the workbook into which the info was pasted?).

    But why does it do this? MS doc says quite clearly (https://support.microsoft.com/en-us/...f-955d67c2b2cf) it returns the Filename (including full path) of the file that contains reference, as text.

    Problem fixed (using a VBA function invoking Thisworkbook.fullname) but thanks for any enlightenment as to why this happens

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: Issue with Cell("filename")

    Please add your XL version to your profile. Thx ( and also your approximative location as that might be important in some cases)

+ 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. VBA Code to trim form rw "O" and make filename as rw "A"
    By asoekha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2021, 11:10 AM
  3. [SOLVED] How to automatically add the Value of a spesific Cell into the "Save" filename?
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2013, 12:55 PM
  4. Replies: 1
    Last Post: 09-09-2013, 11:41 AM
  5. 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
  6. Replies: 0
    Last Post: 08-09-2012, 04:31 PM
  7. [SOLVED] CELL("filename") acting Volatile? (in assoc. with PULL)
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-03-2006, 10:40 AM

Tags for this Thread

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