+ Reply to Thread
Results 1 to 7 of 7

#value returned when using spefic file path in defined name

  1. #1
    Registered User
    Join Date
    12-14-2015
    Location
    Monticello,MN
    MS-Off Ver
    2007
    Posts
    3

    #value returned when using spefic file path in defined name

    I had to find a way to scale back the size of my formula due to the fact the it cannot exceed 8192 characters. From What I can see my file patch is correct in the name manager.
    ="'F:\Public Files\growers\Chemical Record Keeping\MAD Chemicals\[MAD Chemical Tracking.xls]".

    When I click on the insert function button it looks like my formula is ok.
    =SUMIFS('[=MADFileLocation]Template'!$H$1:$H$65536,'[=MADFileLocation]Template'!$A$1:$A$65536,">="&Inventory!$M$5,'[=MADFileLocation]Template'!$A$1:$A$65536,"<="&Inventory!$M$6,'[=MADFileLocation]Template'!$F$1:$F$65536,Inventory!$A8)
    The formula works fine using the absolute file path.

    This has been bugging me for days. I have a work around, but I would love to get this right. I am no programmer, nor do I play one on TV. Just a self taught excel geek.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: #value returned when using spefic file path in defined name

    You have a single quote at the beginning ... 'F:\...

    Maybe that's the problem?

    If you have a formula that is 8000+ characters, I'd suggest that might need reviewing anyway.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-14-2015
    Location
    Monticello,MN
    MS-Off Ver
    2007
    Posts
    3

    Re: #value returned when using spefic file path in defined name

    Thanks for your reply TMS. That did not correct it. The original formula is a large Sumifs that pulls data from up to 3 columns in 4 different workbooks. I need to add in a 5th workbook, which works fine until I turn it into an If(Iserror statement. Then it exceeds the maximum character length, due to length of the file path name when all workbooks are closed.

  4. #4
    Registered User
    Join Date
    08-10-2012
    Location
    Rotterdam, Holland
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: #value returned when using spefic file path in defined name

    SUMIFS or SUMIF formulas do not function properly with closed external files.
    Try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-14-2015
    Location
    Monticello,MN
    MS-Off Ver
    2007
    Posts
    3

    Re: #value returned when using spefic file path in defined name

    Robertswart.
    SUMPRODUCT will not work. The SUM range H:H is a numeric field. Range A:A is a date. M5 and M6 are the month long date ranges. Range F:F is text as well as A8 is the text I want to match.

  6. #6
    Registered User
    Join Date
    08-10-2012
    Location
    Rotterdam, Holland
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: #value returned when using spefic file path in defined name

    Will not or does not? It should work, also with dates and texts.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: #value returned when using spefic file path in defined name

    =SUMIFS('[=MADFileLocation]Template'!$H$1:$H$65536, ...
    Is =MADFileLocation supposed to be a reference to a named constant that contains a filename? It's not -- it's literal text to Excel.
    Entia non sunt multiplicanda sine necessitate

+ 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. Create a folder to save a file and two subfolders in a defined path
    By Biplab1985 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-01-2015, 11:43 AM
  2. Data from closed xlsm file without defined file path???
    By dbrizor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2015, 07:27 AM
  3. Auto save IE file download dialog box in a user defined path
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2014, 05:21 AM
  4. [SOLVED] Run Time 1004 - App Defined or Object defined error with String defined path structure
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2012, 09:38 PM
  5. Replies: 7
    Last Post: 10-09-2009, 10:10 AM
  6. Path for File Saving Defined by USER
    By crapmind in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2007, 09:58 AM
  7. Use String Variables in File Path and create path if not existing
    By JanBang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2007, 09:04 AM

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