Excel: FILES() Function Limited to 256 FilenamesLast reviewed: September 12, 1996Article ID: Q99926 |
The information in this article applies to:
SUMMARYThe FILES() function returns a horizontal array of the names of all files in a specified directory or folder. The number of filenames that this function can return is limited to a maximum of 256.
MORE INFORMATIONAlthough the FILES() function will not return more than 256 filenames at one time, you can use one of the following procedures to narrow the number of files the FILES() function searches for.
Specify the Type of File You Want to FindYou can specify which files you want the FILES() function to return. For example, FILES("C:\EXCEL\*.XLS") will return all files with an .XLS extension and FILES("C:\EXCEL\MAY*.XLS") will return all files that start with MAY and end with .XLS.
Note: This method allows the FILES() function to create an array for each type of file you want a list for (provided the list of files does not exceed 256 names).Categorize Files of Like Names in Separate Directories You can categorize files into separate directories on the hard drive and then use the FILES() function to build a list of filenames for each directory.
REFERENCES"Online Help," version 5.0 "Function Reference", version 4.0, page 147
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |