Excel: DIRECTORIES() Function Returns #N/ALast reviewed: September 12, 1996Article ID: Q96949 |
The information in this article applies to:
SYMPTOMSThe DIRECTORIES() function in Microsoft Excel for Windows will return a #N/A error value if the specified directory contains more than 62 subdirectories. If the specified directory is your root drive, the limit will be 64 directories. This is a limitation of this function and as a result, there is no workaround.
STATUSMicrosoft has confirmed this to be a problem in the versions of Microsoft Excel listed above. We are researching this problem, and will post more information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe DIRECTORIES() function is available after loading the FILEFNS.XLA add- in macro and it returns a horizontal array of all of the subdirectories in the specified path or the current directory. The only argument for the DIRECTORIES() function is path_text. You use path_text to specify the full path of the directory for which you want a list of subdirectories. If the path_text argument is a root drive, as in the following example, the directory limit will be 64:
=DIRECTORIES("D:\")If, the path_text argument includes a directory, as in the following example, the limit will be 62:
=DIRECTORIES("D:\TEST")In this case, the horizontal array returned includes a dot (.) and a double dot (..) for the first two entries. These entries limit the number of actual subdirectories to 62. Following is an example of the first part of the returned array:
={".","..","TEST2","TEST3","TEST4"...} REFERENCES"Microsoft Excel Function Reference," version 4.0, page 114
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |