Feb 23 2018
12:22 PM
- last edited on
Jul 25 2018
11:09 AM
by
TechCommunityAP
Feb 23 2018
12:22 PM
- last edited on
Jul 25 2018
11:09 AM
by
TechCommunityAP
I'm trying to write an IF formula that would return T or F if a file exists in a network folder. Can someone help? Thanks
Mar 05 2018 03:44 PM - edited Mar 14 2018 08:18 AM
You cannot get what you are asking with built-in formulas. If you know how to use VBA User Defined Functions. then here is already an answer for this question using UDF.
Public Function CheckIfFileExists(FilePath As String) On Error GoTo ExitWithError If FilePath = "" Then CheckIfFileExists = "" Exit Function End If If Dir(FilePath) <> "" Then CheckIfFileExists = "File found" Else CheckIfFileExists = "File not found" End If Exit Function ExitWithError: CheckIfFileExists = "File not accessible" End Function
Nov 15 2023 05:12 AM
@wuzmop Great and simple solution!