Question: how to check if file exists in excel macro?
Answer: The following VBA function can be used to check for the existence of a file. All you need to do is pass it the full filename as a string, and the macro returns either True (if the file exists) or False (if it doesn't). This function works by using the Dir function, which checks for a file in a directory.