View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Make excel check external file paths

Use this UDF! Insert it in a normal module!
Public Function FileExists(fname) As Boolean
FileExists = IIf(Dir(fname) < "", True, False)
End Function

Insert in B1: =FileExists(A1) and drag it down as required!

Regards,
Stefi


€˛Stuart€¯ ezt Ć*rta:

I have a spreadsheet which contains thousands of file paths going doing
column A. I wanted excel to be able to look at cell A1, A2 and so on
and check if the file does exist on the harddrive and then return in
cell B1 return Yes or No.

I wanted this to loop until it reaches the end of the file paths and
has returned yes or no for all of them.

Thanks in advance.

Stuart